## javax.script
Class CompiledScript

    java.lang.Object
      javax.script.CompiledScript

    public abstract class CompiledScript

extends java.lang.Object

ComplieScript interface is an abstraction for the intermediate code produced by the compilation and contains methods which allow the re-execution of the intermediate code retained.

Author:
  Nandika Jayawardana <nandika@opensource.lk>, Sanka Samaranayake <sanka@opensource.lk>

Constructor Summary
`CompiledScript()`

Method Summary
`java.lang.Object` `eval(Bindings namespace)` 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
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompiledScript

    public CompiledScript()

Method Detail

### eval

    public java.lang.Object eval(Bindings namespace)
                          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:
    `namespace` - 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