public final class GroovyTranslator extends Object implements Translator.ScriptTranslator
| Modifier and Type | Class and Description | 
|---|---|
| static class  | GroovyTranslator.DefaultTypeTranslatorPerforms standard type translation for the TinkerPop types to Groovy. | 
| static class  | GroovyTranslator.LanguageTypeTranslatorAn extension of the  GroovyTranslator.DefaultTypeTranslatorthat generates Gremlin that is compliant withgremlin-languagescripts. | 
Translator.ScriptTranslator.AbstractTypeTranslator, Translator.ScriptTranslator.TypeTranslatorTranslator.ScriptTranslator, Translator.StepTranslator<S extends TraversalSource,T extends Traversal.Admin<?,?>>| Modifier and Type | Method and Description | 
|---|---|
| String | getTargetLanguage()Get the language that the translator is converting the traversal byte code to. | 
| String | getTraversalSource()Get the  TraversalSourcerepresentation rooting this translator. | 
| static GroovyTranslator | of(String traversalSource) | 
| static GroovyTranslator | of(String traversalSource,
  boolean withParameters)Creates the translator with the  GroovyTranslator.DefaultTypeTranslatorpassing thewithParametersoption 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)Creates the translator with a custom  TypeTranslatorinstance. | 
| String | toString() | 
| Script | translate(Bytecode bytecode)Translate  Bytecodeinto a new representation. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittranslatepublic static GroovyTranslator of(String traversalSource)
public static GroovyTranslator of(String traversalSource, boolean withParameters)
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.public static GroovyTranslator of(String traversalSource, Translator.ScriptTranslator.TypeTranslator typeTranslator)
TypeTranslator instance.public Script translate(Bytecode bytecode)
TranslatorBytecode into a new representation. Typically, for language translations, the translation is
 to a string representing the traversal in the respective scripting language.translate in interface Translator<String,Script>bytecode - the bytecode representing traversal source and traversal manipulations.public String getTargetLanguage()
TranslatorgetTargetLanguage in interface Translator<String,Script>public String getTraversalSource()
TranslatorTraversalSource 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.getTraversalSource in interface Translator<String,Script>Copyright © 2013–2022 Apache Software Foundation. All rights reserved.