org.apache.tinkerpop.gremlin.groovy.jsr223

## Class GroovyTranslator

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

- All Implemented Interfaces:
    Translator<String,Script>, Translator.ScriptTranslator

  Deprecated.
  As of release 3.4.9, moved to `GroovyTranslator` in `gremlin-core`.

      @Deprecated
      public final class GroovyTranslator
      extends Object
      implements Translator.ScriptTranslator

  Converts bytecode to a Groovy string of Gremlin.
  Author:
    Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com), Stark Arya (sandszhou.zj@alibaba-inc.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GroovyTranslator.DefaultTypeTranslator` Deprecated. Performs standard type translation for the TinkerPop types to Groovy.

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Translator.ScriptTranslator

      `Translator.ScriptTranslator.AbstractTypeTranslator, Translator.ScriptTranslator.TypeTranslator`

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Translator

      `Translator.ScriptTranslator, Translator.StepTranslator<S extends TraversalSource,T extends Traversal.Admin<?,?>>`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getTargetLanguage()` Deprecated. Get the language that the translator is converting the traversal byte code to.
    `String` | `getTraversalSource()` Deprecated. Get the `TraversalSource` representation rooting this translator.
    `static GroovyTranslator` | `of(String traversalSource)` Deprecated. Creates the translator with a `false` argument to `withParameters` using `of(String, boolean)`.
    `static GroovyTranslator` | `of(String traversalSource, boolean withParameters)` Deprecated. Creates the translator with the `GroovyTranslator.DefaultTypeTranslator` passing the `withParameters` option to it which will handle type translation in a fashion that should typically increase cache hits and reduce compilation times if enabled at the sacrifice to rewriting of the script that could reduce readability.
    `static GroovyTranslator` | `of(String traversalSource, Translator.ScriptTranslator.TypeTranslator typeTranslator)` Deprecated.
    `String` | `toString()` Deprecated.
    `Script` | `translate(Bytecode bytecode)` Deprecated. Translate `Bytecode` into a new representation.

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Translator

      `translate`

- - ### Method Detail

    - #### of

          public static final GroovyTranslator of(String traversalSource)

      Deprecated.
      Creates the translator with a `false` argument to `withParameters` using `of(String, boolean)`.

    - #### of

          public static final GroovyTranslator of(String traversalSource,
                                                  boolean withParameters)

      Deprecated.
      Creates the translator with the `GroovyTranslator.DefaultTypeTranslator` passing the `withParameters` option to it which will handle type translation in a fashion that should typically increase cache hits and reduce compilation times if enabled at the sacrifice to rewriting of the script that could reduce readability.

    - #### of

          public static final GroovyTranslator of(String traversalSource,
                                                  Translator.ScriptTranslator.TypeTranslator typeTranslator)

      Deprecated.

    - #### translate

          public Script translate(Bytecode bytecode)

      Deprecated.
      Description copied from interface: `Translator`
      Translate `Bytecode` into a new representation. Typically, for language translations, the translation is to a string representing the traversal in the respective scripting language.
      Specified by:
        `translate` in interface `Translator<String,Script>`
      Parameters:
        `bytecode` - the bytecode representing traversal source and traversal manipulations.
      Returns:
        the translated object

    - #### getTargetLanguage

          public String getTargetLanguage()

      Deprecated.
      Description copied from interface: `Translator`
      Get the language that the translator is converting the traversal byte code to.
      Specified by:
        `getTargetLanguage` in interface `Translator<String,Script>`
      Returns:
        the language of the translation

    - #### toString

          public String toString()

      Deprecated.
      Overrides:
        `toString` in class `Object`

    - #### getTraversalSource

          public String getTraversalSource()

      Deprecated.
      Description copied from interface: `Translator`
      Get the `TraversalSource` representation rooting this translator. For string-based translators (`Translator.ScriptTranslator`), this is typically a "g". For java-based translators (`Translator.StepTranslator`), this is typically the `TraversalSource` instance which the `Traversal` will be built from.
      Specified by:
        `getTraversalSource` in interface `Translator<String,Script>`
      Returns:
        the traversal source representation

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