| org.mozilla.javascript.Function
All known Subclasses: org.mozilla.javascript.regexp.NativeRegExp, org.mozilla.javascript.Delegator, org.mozilla.javascript.BaseFunction, org.mozilla.javascript.xmlimpl.XMLList, org.mozilla.javascript.NativeJavaClass, org.mozilla.javascript.xml.impl.xmlbeans.XMLList, org.mozilla.javascript.continuations.Continuation, org.mozilla.javascript.NativeJavaTopPackage,
Method Summary | |
public Object | call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Call the function.
Note that the array of arguments is not guaranteed to have
length greater than 0.
Parameters: cx - the current Context for this thread Parameters: scope - the scope to execute the function relative to. | public Scriptable | construct(Context cx, Scriptable scope, Object[] args) Call the function as a constructor.
This method is invoked by the runtime in order to satisfy a use
of the JavaScript new operator. |
call | public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)(Code) | | Call the function.
Note that the array of arguments is not guaranteed to have
length greater than 0.
Parameters: cx - the current Context for this thread Parameters: scope - the scope to execute the function relative to. This isset to the value returned by getParentScope() exceptwhen the function is called from a closure. Parameters: thisObj - the JavaScript this object Parameters: args - the array of arguments the result of the call |
construct | public Scriptable construct(Context cx, Scriptable scope, Object[] args)(Code) | | Call the function as a constructor.
This method is invoked by the runtime in order to satisfy a use
of the JavaScript new operator. This method is
expected to create a new object and return it.
Parameters: cx - the current Context for this thread Parameters: scope - an enclosing scope of the caller exceptwhen the function is called from a closure. Parameters: args - the array of arguments the allocated object |
|
|