org.apache.tinkerpop.gremlin.groovy.jsr223

## Class ScriptEnginePluginAcceptor

- java.lang.Object
- - org.apache.tinkerpop.gremlin.groovy.jsr223.ScriptEnginePluginAcceptor

- All Implemented Interfaces:
    PluginAcceptor

  Deprecated.
  As of release 3.2.4, not replaced.

      @Deprecated
      public class ScriptEnginePluginAcceptor
      extends Object
      implements PluginAcceptor

  A `PluginAcceptor` implementation for bare `ScriptEngine` implementations allowing plugins to interact with them on initialization.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptEnginePluginAcceptor(ScriptEngine scriptEngine)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScriptEnginePluginAcceptor

          public ScriptEnginePluginAcceptor(ScriptEngine scriptEngine)

      Deprecated.

  - ### Method Detail

    - #### addBinding

          public void addBinding(String key,
                                 Object val)

      Deprecated.
      Adds global bindings to the `ScriptEngine` that will be applied to every evaluated script.
      Specified by:
        `addBinding` in interface `PluginAcceptor`

    - #### getBindings

          public Map<String,Object> getBindings()

      Deprecated.
      Gets the global bindings that will be applied to every evaluated script.
      Specified by:
        `getBindings` in interface `PluginAcceptor`

    - #### addImports

          public void addImports(Set<String> importStatements)

      Deprecated.
      If the `ScriptEngine` implements the `DependencyManager` interface it will try to import the specified import statements.
      Specified by:
        `addImports` in interface `PluginAcceptor`

    - #### eval

          public Object eval(String script)
                      throws ScriptException

      Deprecated.
      Evaluate a script in the `ScriptEngine`. Typically `eval()` should be called after imports as `ScriptEngine` resets may occur during import.
      Specified by:
        `eval` in interface `PluginAcceptor`
      Throws:
        `ScriptException`

    - #### environment

          public Map<String,Object> environment()

      Deprecated.
      Defines the environment settings for the `GremlinPlugin`.
      Specified by:
        `environment` in interface `PluginAcceptor`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.