@Deprecated public class ScriptEnginePluginAcceptor extends Object implements PluginAcceptor
PluginAcceptor
implementation for bare ScriptEngine
implementations allowing plugins to
interact with them on initialization.Constructor and Description |
---|
ScriptEnginePluginAcceptor(ScriptEngine scriptEngine)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addBinding(String key,
Object val)
Deprecated.
Adds global bindings to the
ScriptEngine that will be applied to every evaluated script. |
void |
addImports(Set<String> importStatements)
Deprecated.
If the
ScriptEngine implements the DependencyManager interface it will try to import the
specified import statements. |
Map<String,Object> |
environment()
Deprecated.
Defines the environment settings for the
GremlinPlugin . |
Object |
eval(String script)
Deprecated.
Evaluate a script in the
ScriptEngine . |
Map<String,Object> |
getBindings()
Deprecated.
Gets the global bindings that will be applied to every evaluated script.
|
public ScriptEnginePluginAcceptor(ScriptEngine scriptEngine)
public void addBinding(String key, Object val)
ScriptEngine
that will be applied to every evaluated script.addBinding
in interface PluginAcceptor
public Map<String,Object> getBindings()
getBindings
in interface PluginAcceptor
public void addImports(Set<String> importStatements)
ScriptEngine
implements the DependencyManager
interface it will try to import the
specified import statements.addImports
in interface PluginAcceptor
public Object eval(String script) throws ScriptException
ScriptEngine
. Typically eval()
should be called after imports as
ScriptEngine
resets may occur during import.eval
in interface PluginAcceptor
ScriptException
public Map<String,Object> environment()
GremlinPlugin
.environment
in interface PluginAcceptor
Copyright © 2013–2018 Apache Software Foundation. All rights reserved.