Class PreCompiled

java.lang.Object
org.oddjob.script.PreCompiled
All Implemented Interfaces:
Evaluatable

public class PreCompiled extends Object implements Evaluatable
Provide an Evaluatable for a CompiledScript.
Author:
rob
  • Constructor Details

  • Method Details

    • getScriptContext

      public ScriptContext getScriptContext()
      Description copied from interface: Evaluatable
      Get the Script Context for the Engine. For Nashorn this has to come from the Engine to get the correct Engine Bindings.
      Specified by:
      getScriptContext in interface Evaluatable
      Returns:
      A Script Context. Must not be null.
    • eval

      public Object eval(ScriptContext scriptContext) throws ScriptException
      Description copied from interface: Evaluatable
      Evaluate the evaluatable.
      Specified by:
      eval in interface Evaluatable
      Parameters:
      scriptContext - Context to evaluate script in. Must not be null;
      Returns:
      The object returned by the script or null if the script does not return a value.
      Throws:
      ScriptException