Class JavaTranslateVisitor

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

public class JavaTranslateVisitor extends AbstractTranslateVisitor
Converts a Gremlin traversal string into a Java source code representation of that traversal with an aim at sacrificing some formatting for the ability to compile correctly.
  • Range syntax has no direct support
  • Normalizes whitespace
  • 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