org.apache.tinkerpop.gremlin.jsr223

## Interface GremlinScriptEngine

- All Superinterfaces:
    ScriptEngine
  All Known Implementing Classes:
    GremlinGroovyScriptEngine, GremlinJythonScriptEngine, MockGremlinScriptEngine

      public interface GremlinScriptEngine
      extends ScriptEngine

  A `GremlinScriptEngine` is an extension of the standard `ScriptEngine` and provides some specific methods that are important to the TinkerPop environment.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `HIDDEN_G`

    - ### Fields inherited from interface javax.script.ScriptEngine

      `ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Traversal.Admin` | `eval(Bytecode bytecode)` Deprecated. As of release 3.2.7, replaced by `eval(Bytecode, String)`.
    `default Traversal.Admin` | `eval(Bytecode bytecode, Bindings bindings)` Deprecated. As of release 3.2.7, replaced by `eval(Bytecode, Bindings, String)`.
    `Traversal.Admin` | `eval(Bytecode bytecode, Bindings bindings, String traversalSource)` Evaluates `Traversal` `Bytecode` with the specified `Bindings`.
    `default Traversal.Admin` | `eval(Bytecode bytecode, String traversalSource)` Evaluates `Traversal` `Bytecode` against a traversal source in the global bindings of the `ScriptEngine`.
    `GremlinScriptEngineFactory` | `getFactory()`

    - ### Methods inherited from interface javax.script.ScriptEngine

      `createBindings, eval, eval, eval, eval, eval, eval, get, getBindings, getContext, put, setBindings, setContext`

- - ### Field Detail

    - #### HIDDEN_G

          static final String HIDDEN_G

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getFactory

          GremlinScriptEngineFactory getFactory()

      Specified by:
        `getFactory` in interface `ScriptEngine`

    - #### eval

          @Deprecated
          default Traversal.Admin eval(Bytecode bytecode)
                                            throws ScriptException

      Deprecated. As of release 3.2.7, replaced by `eval(Bytecode, String)`.
      Evaluates `Traversal` `Bytecode`. This method assumes that the traversal source to execute the bytecode against is in the global bindings and is named "g".
      Throws:
        `ScriptException`

    - #### eval

          @Deprecated
          default Traversal.Admin eval(Bytecode bytecode,
                                                   Bindings bindings)
                                            throws ScriptException

      Deprecated. As of release 3.2.7, replaced by `eval(Bytecode, Bindings, String)`.
      Evaluates `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. This method assumes that the traversal source to execute against is named "g".
      Throws:
        `ScriptException`

    - #### eval

          default Traversal.Admin eval(Bytecode bytecode,
                                       String traversalSource)
                                throws ScriptException

      Evaluates `Traversal` `Bytecode` against a traversal source in the global bindings of the `ScriptEngine`.
      Parameters:
        `bytecode` - of the traversal to execute
        `traversalSource` - to execute the bytecode against which should be in the available bindings.
      Throws:
        `ScriptException`

    - #### eval

          Traversal.Admin eval(Bytecode bytecode,
                               Bindings bindings,
                               String traversalSource)
                        throws ScriptException

      Evaluates `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.
      Throws:
        `ScriptException`

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