public class MockGremlinScriptEngine extends AbstractScriptEngine implements GremlinScriptEngine
GremlinScriptEngine
which can be used to help test plugin
implementations which don't have reference to a GremlinScriptEngine
as a dependency.context
HIDDEN_G
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
Constructor and Description |
---|
MockGremlinScriptEngine() |
Modifier and Type | Method and Description |
---|---|
Bindings |
createBindings() |
Traversal.Admin |
eval(Bytecode bytecode,
Bindings bindings,
String traversalSource)
|
Object |
eval(Reader reader,
ScriptContext context) |
Object |
eval(String script,
ScriptContext context) |
GremlinScriptEngineFactory |
getFactory() |
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
eval
eval, eval, eval, eval, get, getBindings, getContext, put, setBindings, setContext
public GremlinScriptEngineFactory getFactory()
getFactory
in interface ScriptEngine
getFactory
in interface GremlinScriptEngine
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 Traversal.Admin eval(Bytecode bytecode, Bindings bindings, String traversalSource) throws ScriptException
GremlinScriptEngine
Traversal
Bytecode
with the specified Bindings
. These Bindings
supplied to this method will be merged with global engine bindings and override them where keys match.eval
in interface GremlinScriptEngine
ScriptException
public Bindings createBindings()
createBindings
in interface ScriptEngine
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.