@Override
    public Void visitGenericCollectionLiteral(final GremlinParser.GenericCollectionLiteralContext ctx) {
        sb.append("new ArrayList<Object>() {{ ");
        for (int i = 0; i < ctx.genericLiteral().size(); i++) {
            final GremlinParser.GenericLiteralContext genericLiteralContext = ctx.genericLiteral(i);
            sb.append("add(");
            visit(genericLiteralContext);
            sb.append(");");
            if (i < ctx.genericLiteral().size() - 1)
                sb.append(" ");
        }
        sb.append(" }}");
        return null;
    }
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.
<ul>
    <li>Range syntax has no direct support</li>
    <li>Normalizes whitespace</li>
    <li>Normalize numeric suffixes to lower case</li>
    <li>If floats are not suffixed they will translate as BigDecimal</li>
    <li>Makes anonymous traversals explicit with double underscore</li>
    <li>Makes enums explicit with their proper name</li>
</ul>
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavaTranslateVisitor.java