Save This Page
Home » bsf-src-2.4.0 » org.apache.bsf.debug.jsdi » [javadoc | source]
org.apache.bsf.debug.jsdi
public interface: JsFunction [javadoc | source]

All Implemented Interfaces:
    JsCode

Represents a function in the engine since JavaScript has code as first-class objects.
Method from org.apache.bsf.debug.jsdi.JsFunction Summary:
call,   construct,   getArgumentCount,   getFunctionName
Method from org.apache.bsf.debug.jsdi.JsFunction Detail:
 public Object call(JsContext cx,
    JsObject scope,
    JsObject thisObj,
    Object[] args) throws RemoteException
    Call the function. Note that the array of arguments is not guaranteed to have length greater than 0.
 public JsObject construct(JsContext cx,
    JsObject scope,
    Object[] args) throws RemoteException
    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.
 public int getArgumentCount() throws RemoteException
 public String getFunctionName() throws RemoteException