| Package | Description |
|---|---|
| javax.script |
The scripting API consists of interfaces and classes that define Java
TM Scripting Engines and provides a framework for their use in Java applications.
|
| Modifier and Type | Method and Description |
|---|---|
CompiledScript |
Compilable.compile(Reader
Compiles the script (source read from
Reader) for later execution.
|
CompiledScript |
Compilable.compile(String
Compiles the script (source represented as a
String) for later execution.
|
Object |
CompiledScript.eval()
Executes the program stored in the
CompiledScript object.
|
Object |
CompiledScript.eval(Bindings
Executes the program stored in the
CompiledScript object using the supplied
Bindings of attributes as the
ENGINE_SCOPE of the associated
ScriptEngine during script execution.
|
Object |
ScriptEngine.eval(Reader
Same as
eval(String) except that the source of the script is provided as a
Reader
|
Object |
AbstractScriptEngine.eval(Reader
eval(Reader) calls the abstract
eval(Reader, ScriptContext) passing the value of the
context field.
|
Object |
ScriptEngine.eval(Reader
Same as
eval(String, Bindings) except that the source of the script is provided as a
Reader.
|
Object |
AbstractScriptEngine.eval(Reader
eval(Reader, Bindings) calls the abstract
eval(Reader, ScriptContext) method, passing it a
ScriptContext whose Reader, Writers and Bindings for scopes other that
ENGINE_SCOPE are identical to those members of the protected
context field.
|
Object |
ScriptEngine.eval(Reader
Same as
eval(String, ScriptContext) where the source of the script is read from a
Reader.
|
abstract Object |
CompiledScript.eval(ScriptContext
Executes the program stored in this
CompiledScript object.
|
Object |
ScriptEngine.eval(String
Executes the specified script.
|
Object |
AbstractScriptEngine.eval(String
Same as
eval(Reader) except that the abstract
eval(String, ScriptContext) is used.
|
Object |
ScriptEngine.eval(String
Executes the script using the
Bindings argument as the
ENGINE_SCOPE
Bindings of the
ScriptEngine during the script execution.
|
Object |
AbstractScriptEngine.eval(String
Same as
eval(Reader, Bindings) except that the abstract
eval(String, ScriptContext) is used.
|
Object |
ScriptEngine.eval(String
Causes the immediate execution of the script whose source is the String passed as the first argument.
|
Object |
Invocable.invokeFunction(String
Used to call top-level procedures and functions defined in scripts.
|
Object |
Invocable.invokeMethod(Object
Calls a method on a script object compiled during a previous script execution, which is retained in the state of the
ScriptEngine.
|