public abstract class AbstractScriptEngine extends Object implements ScriptEngine, Logged
Modifier and Type | Field and Description |
---|---|
protected Bindings |
engineScopeBindings |
protected ScriptContext |
scriptContext |
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
Constructor and Description |
---|
AbstractScriptEngine() |
Modifier and Type | Method and Description |
---|---|
Bindings |
createBindings() |
abstract Object |
eval(Reader reader) |
Object |
eval(Reader reader,
Bindings n) |
Object |
eval(Reader reader,
ScriptContext context) |
abstract Object |
eval(String script) |
Object |
eval(String script,
Bindings n) |
Object |
eval(String script,
ScriptContext context) |
Object |
get(String key) |
Bindings |
getBindings(int scope) |
ScriptContext |
getContext() |
ScriptEngineFactory |
getFactory() |
LogService |
log()
Gets the
LogService to use when logging activities. |
void |
put(String key,
Object value) |
void |
setBindings(Bindings bindings,
int scope) |
void |
setContext(ScriptContext context) |
void |
setLogService(LogService log) |
protected Bindings engineScopeBindings
protected ScriptContext scriptContext
public abstract Object eval(String script) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public abstract Object eval(Reader reader) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public LogService log()
Logged
LogService
to use when logging activities.public void setLogService(LogService log)
public Object get(String key)
get
in interface ScriptEngine
public Bindings getBindings(int scope)
getBindings
in interface ScriptEngine
public void put(String key, Object value)
put
in interface ScriptEngine
public ScriptContext getContext()
getContext
in interface ScriptEngine
public void setContext(ScriptContext context)
setContext
in interface ScriptEngine
public ScriptEngineFactory getFactory()
getFactory
in interface ScriptEngine
public Object eval(String script, ScriptContext context) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public Object eval(Reader reader, ScriptContext context) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public Bindings createBindings()
createBindings
in interface ScriptEngine
public Object eval(String script, Bindings n) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public Object eval(Reader reader, Bindings n) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public void setBindings(Bindings bindings, int scope)
setBindings
in interface ScriptEngine
Copyright © 2015–2022 SciJava. All rights reserved.