public interface Translator<S,T>
Bytecode
into another representation. That representation may be a
Java instance via Translator.StepTranslator
or a String script in some language via Translator.ScriptTranslator
.
The parameterization of Translator is S (traversal source) and T (full translation).Modifier and Type | Interface and Description |
---|---|
static interface |
Translator.ScriptTranslator
Translates bytecode to a string representation.
|
static interface |
Translator.StepTranslator<S extends TraversalSource,T extends Traversal.Admin<?,?>>
Translates bytecode to actual steps.
|
Modifier and Type | Method and Description |
---|---|
String |
getTargetLanguage()
Get the language that the translator is converting the traversal byte code to.
|
S |
getTraversalSource()
Get the
TraversalSource representation rooting this translator. |
T |
translate(Bytecode bytecode)
Translate
Bytecode into a new representation. |
S getTraversalSource()
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.T translate(Bytecode bytecode)
Bytecode
into a new representation.
Typically, for language translations, the translation is to a string represenging the traversal in the respective scripting language.bytecode
- the byte code representing traversal source and traversal manipulations.String getTargetLanguage()
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.