Class JavaCompiledScript
java.lang.Object
javax.script.CompiledScript
ch.obermuhlner.scriptengine.java.JavaCompiledScript
The compiled Java script created by a
JavaScriptEngine.-
Method Summary
Modifier and TypeMethodDescriptioneval(ScriptContext context) Class<?> Returns the compiledClass.Returns the instance of the compiledClass.Deprecated.Class<?> Deprecated.in release 1.1.0 this method was deprecated, usegetCompiledClass()instead.voidsetExecutionStrategy(ExecutionStrategy executionStrategy) Sets theExecutionStrategyto be used when evaluating the compiled class instance.Methods inherited from class CompiledScript
eval, eval
-
Method Details
-
getCompiledClass
-
getCompiledInstance
Returns the instance of the compiledClass.- Returns:
- the instance of the compiled
Classornullif no instance was created and only static methods will be called by the theExecutionStrategy.
-
getInstanceClass
Deprecated.in release 1.1.0 this method was deprecated, usegetCompiledClass()instead.Returns the compiledClass.- Returns:
- the compiled
Class.
-
getInstance
Deprecated.in release 1.1.0 this method was deprecated, usegetCompiledInstance()instead.Returns the instance of the compiledClass.- Returns:
- the instance of the compiled
Classornullif no instance was created and only static methods will be called by the theExecutionStrategy.
-
setExecutionStrategy
Sets theExecutionStrategyto be used when evaluating the compiled class instance.- Parameters:
executionStrategy- theExecutionStrategy
-
getEngine
- Specified by:
getEnginein classCompiledScript
-
eval
- Specified by:
evalin classCompiledScript- Throws:
ScriptException
-
getCompiledInstance()instead.