private Void handleGenerics(final ParseTree ctx) {
        final String step = ctx.getChild(0).getText();
        sb.append(convertToPascalCase(step));

        if (step.equals(GraphTraversal.Symbols.group) || step.equals(GraphTraversal.Symbols.valueMap))
            sb.append("<object, object>");
        else
            sb.append("<object>");

        for (int ix = 1; ix < ctx.getChildCount(); ix++) {
            visit(ctx.getChild(ix));
        }
        return null;
    }
Steps with a {@code <TNewEnd>} defined need special handling to append generics.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/DotNetTranslateVisitor.java