public interface DependencyManager
Modifier and Type | Method and Description |
---|---|
void |
addImports(Set<String> importStatements)
Perform class imports for the ScriptEngine.
|
Map[] |
dependencies()
List the dependencies in the ScriptEngine classloader.
|
Map<String,Set<String>> |
imports()
List the imports in the ScriptEngine;
|
void |
loadPlugins(List<GremlinPlugin> plugins)
Load a list of
GremlinPlugin instances. |
void |
reset()
Reset the ScriptEngine.
|
List<GremlinPlugin> |
use(String group,
String artifact,
String version)
Take maven coordinates and load the classes into the classloader used by the ScriptEngine.
|
List<GremlinPlugin> use(String group, String artifact, String version)
GremlinPlugin
implementations in the classloader. The GremlinGroovyScriptEngine
implementation uses ServiceLoader to figure out if there are such classes to return.
GremlinPlugin.pluginTo(org.apache.tinkerpop.gremlin.groovy.plugin.PluginAcceptor)
method. The reason for
this has to do with conflicts that can occur with mapper imports that are added via the
ImportCustomizerProvider
and scripts executed through the
PluginAcceptor
. Generally speaking, all calls to this "use" method
should be complete prior to calling
GremlinPlugin.pluginTo(org.apache.tinkerpop.gremlin.groovy.plugin.PluginAcceptor)
.void loadPlugins(List<GremlinPlugin> plugins) throws GremlinPluginException
GremlinPlugin
instances. These plugins are typically returned from calls to
use(String, String, String)
.GremlinPluginException
- if there is a problem loading the plugin itself.void addImports(Set<String> importStatements)
Map[] dependencies()
void reset()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.