org.apache.tinkerpop.gremlin.jsr223

## Interface GremlinScriptEngine

- All Superinterfaces:
    ScriptEngine
  All Known Implementing Classes:
    GremlinGroovyScriptEngine, 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
    Modifier and Type | Method and Description
    --- | ---
    `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

          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–2021 Apache Software Foundation. All rights reserved.