Class GroovyTranslateVisitor

  • All Implemented Interfaces:
    org.antlr.v4.runtime.tree.ParseTreeVisitor<Void>, GremlinVisitor<Void>

    public class GroovyTranslateVisitor
    extends TranslateVisitor
    Converts a Gremlin traversal string into a Groovy source code representation of that traversal with an aim at sacrificing some formatting for the ability to compile correctly. The translations may require use of TinkerPop's sugar syntax and therefore requires use of the GremlinLoader in the gremlin-groovy module unless you are specifically certain that your translations will not result in the use of that syntax. If in doubt, prefer the JavaTranslateVisitor instead.
    • Normalize numeric suffixes to lower case
    • If floats are not suffixed they will translate as BigDecimal
    • Makes anonymous traversals explicit with double underscore
    • Makes enums explicit with their proper name