public class SourceExecutableScript extends CompiledExecutableScript
Modifier and Type | Field and Description |
---|---|
protected String |
scriptSource
The source of the script.
|
protected boolean |
shouldBeCompiled
Flag to signal if the script should be compiled
|
compiledScript
language
Constructor and Description |
---|
SourceExecutableScript(String language,
String source) |
Modifier and Type | Method and Description |
---|---|
CompiledScript |
compile(ScriptEngine scriptEngine,
String language,
String src) |
protected void |
compileScript(ScriptEngine engine) |
Object |
evaluate(ScriptEngine engine,
VariableScope variableScope,
Bindings bindings) |
protected Object |
evaluateScript(ScriptEngine engine,
Bindings bindings) |
String |
getScriptSource() |
boolean |
isShouldBeCompiled() |
void |
setScriptSource(String scriptSource)
Sets the script source code.
|
getCompiledScript, setCompiledScript
execute, getActivityIdExceptionMessage, getLanguage
protected String scriptSource
protected boolean shouldBeCompiled
public Object evaluate(ScriptEngine engine, VariableScope variableScope, Bindings bindings)
evaluate
in class CompiledExecutableScript
protected void compileScript(ScriptEngine engine)
public CompiledScript compile(ScriptEngine scriptEngine, String language, String src)
protected Object evaluateScript(ScriptEngine engine, Bindings bindings) throws ScriptException
ScriptException
public String getScriptSource()
public void setScriptSource(String scriptSource)
scriptSource
- the new script source codepublic boolean isShouldBeCompiled()
Copyright © 2019. All rights reserved.