Package org.oddjob.script
Class PreCompiled
java.lang.Object
org.oddjob.script.PreCompiled
- All Implemented Interfaces:
Evaluatable
Provide an
Evaluatable for a CompiledScript.- Author:
- rob
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioneval(ScriptContext scriptContext) Evaluate the evaluatable.Get the Script Context for the Engine.
-
Constructor Details
-
PreCompiled
-
-
Method Details
-
getScriptContext
Description copied from interface:EvaluatableGet the Script Context for the Engine. For Nashorn this has to come from the Engine to get the correct Engine Bindings.- Specified by:
getScriptContextin interfaceEvaluatable- Returns:
- A Script Context. Must not be null.
-
eval
Description copied from interface:EvaluatableEvaluate the evaluatable.- Specified by:
evalin interfaceEvaluatable- 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
-