1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 * 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 package org.mozilla.javascript; 8 9 /** 10 * Object that can allows assignments to the result of function calls. 11 */ 12 public interface RefCallable extends Callable 13 { 14 /** 15 * Perform function call in reference context. 16 * The args array reference should not be stored in any object that is 17 * can be GC-reachable after this method returns. If this is necessary, 18 * for example, to implement {@link Ref} methods, then store args.clone(), 19 * not args array itself. 20 * 21 * @param cx the current Context for this thread 22 * @param thisObj the JavaScript <code>this</code> object 23 * @param args the array of arguments 24 */ refCall(Context cx, Scriptable thisObj, Object[] args)25 public Ref refCall(Context cx, Scriptable thisObj, Object[] args); 26 } 27 28