|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Invocable
Optional interface implemented by ScriptEngines which
allow the invocation of procedures in scripts that have previously
been executed.
See Javadoc of Java Scripting API
| Method Summary | |
|---|---|
java.lang.Object |
getInterface(java.lang.Class clasz)
Retrieves an instance of a java class whose methods are implemented using procedures in script which are in the intermediate code repository in the underlying interpreter. |
java.lang.Object |
getInterface(java.lang.Object thiz,
java.lang.Class clasz)
Retrieves an instance of a java class whose methods are implemented using procedures in script which are in the intermediate code repository in the underlying interpreter. |
java.lang.Object |
invokeFunction(java.lang.String name,
java.lang.Object[] args)
Invokes a scripting procedure with the given name using the array of objects as its arguments set. |
java.lang.Object |
invokeMethod(java.lang.Object thiz,
java.lang.String name,
java.lang.Object[] args)
Invokes a procedure on an object which already defined in the script using the array of objects as its arguments set. |
| Method Detail |
|---|
java.lang.Object invokeFunction(java.lang.String name,
java.lang.Object[] args)
throws ScriptException,
java.lang.NoSuchMethodException
name - name of the scripting procedureargs - arguments set for the scripting procedure
ScriptException - if the invocation of the scripting procedure
fails
java.lang.NoSuchMethodException - if method with given name or matching
argument types cannot be found
java.lang.NullPointerException - if the method name is null.
java.lang.Object invokeMethod(java.lang.Object thiz,
java.lang.String name,
java.lang.Object[] args)
throws ScriptException,
java.lang.NoSuchMethodException
thiz - object on which the procedure is calledname - name of the procedure to be invokedargs - arguments set for the procedure
ScriptException - if the invocation of the procedure fails
java.lang.NoSuchMethodException - if a method with given name or matching
argument types cannot be found
java.lang.NullPointerException - if the method name is null.
java.lang.IllegalArgumentException - if the specified thiz
is null or the specified Object is does not represent a scripting object.java.lang.Object getInterface(java.lang.Class clasz)
clasz - an interface which the returned class must
implement
java.lang.IllegalArgumentException - if the specified Class object is null or is not an interface
java.lang.Object getInterface(java.lang.Object thiz,
java.lang.Class clasz)
thiz - The scripting object whose member functions are used to implement the methods of the interface.clasz - The Class object of the interface to return.
java.lang.IllegalArgumentException - if the specified Class object is null or is not an interface,
or if the specified Object is null or does not represent a scripting object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||