javax.script
Class CompiledScript

java.lang.Object
  extended by javax.script.CompiledScript

public abstract class CompiledScript
extends java.lang.Object

See Javadoc of Java Scripting API


Constructor Summary
CompiledScript()
           
 
Method Summary
 java.lang.Object eval()
          Re-evaluates the pre-compiled script stored using the ENGINE_SCOPE and the GLOBAL_SCOPE of the associated ScriptEngine and returns the resultant object.
 java.lang.Object eval(Bindings bindings)
          Re-evaluates the pre-compiled script using the specified namespace as the SCRIPT_SCOPE and using ENGINE_SCOPE, GLOBAL_SCOPE of the associated ScriptEngine.
abstract  java.lang.Object eval(ScriptContext context)
          Re-evaluates the recompiled script using the specified ScriptContext.
abstract  ScriptEngine getEngine()
          Retrieves a reference to the ScriptEngine whose methods created this CompiledScript object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompiledScript

public CompiledScript()
Method Detail

eval

public java.lang.Object eval()
                      throws ScriptException
Re-evaluates the pre-compiled script stored using the ENGINE_SCOPE and the GLOBAL_SCOPE of the associated ScriptEngine and returns the resultant object.

Returns:
the resultant object after the re-evaluation of the script
Throws:
ScriptException - if re-evaluation fails due to any reason

eval

public java.lang.Object eval(Bindings bindings)
                      throws ScriptException
Re-evaluates the pre-compiled script using the specified namespace as the SCRIPT_SCOPE and using ENGINE_SCOPE, GLOBAL_SCOPE of the associated ScriptEngine.

Parameters:
bindings - the namespace to be used as the SCRIPT_SCOPE
Returns:
resultant object after the re-evaluation
Throws:
ScriptException - if the re-evaluation fails due to any reason

eval

public abstract java.lang.Object eval(ScriptContext context)
                               throws ScriptException
Re-evaluates the recompiled script using the specified ScriptContext.

Parameters:
context - A ScriptContext to be used in the re-evalution of the script
Returns:
resultant object after the re-evaluation
Throws:
ScriptException - if the re-evaluation fails due to any reason

getEngine

public abstract ScriptEngine getEngine()
Retrieves a reference to the ScriptEngine whose methods created this CompiledScript object.

Returns:
the ScriptEngine which created this CompiledScript object


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.