|
Préférences
Moteurs de recherche
|
||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.6.0
javax.script
|
|||||||||||||||||
| Constructor Summary | |
|---|---|
CompiledScript()
|
|
| Method Summary | |
|---|---|
Object |
eval()
Executes the program stored in the CompiledScript object. |
Object |
eval(Bindings 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. |
abstract Object |
eval(ScriptContext context)
Executes the program stored in this CompiledScript object. |
abstract ScriptEngine |
getEngine()
Returns the ScriptEngine wbose compile method created this CompiledScript. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompiledScript()
| Method Detail |
|---|
public abstract Object eval(ScriptContext context) throws ScriptException
CompiledScript object.
context - A ScriptContext that is used in the same way as
the ScriptContext passed to the eval methods of
ScriptEngine.
null
if no value is returned by the script execution.
ScriptException - if an error occurs.
NullPointerException - if context is null.public Object eval(Bindings bindings) throws ScriptException
CompiledScript object using
the supplied Bindings of attributes as the ENGINE_SCOPE of the
associated ScriptEngine during script execution. If bindings is null,
then the effect of calling this method is same as that of eval(getEngine().getContext()).
.
The GLOBAL_SCOPE Bindings, Reader and Writer
associated with the default ScriptContext of the associated ScriptEngine are used.
bindings - The bindings of attributes used for the ENGINE_SCOPE.
ScriptException - if an error occurs.public Object eval() throws ScriptException
CompiledScript object. The
default ScriptContext of the associated ScriptEngine is used.
The effect of calling this method is same as that of eval(getEngine().getContext()).
ScriptException - if an error occurs.public abstract ScriptEngine getEngine()
ScriptEngine wbose compile method created this CompiledScript.
The CompiledScript will execute in this engine.
ScriptEngine that created this CompiledScript