@Test public void testMCBasicTypeArgument2() throws IOException { MCSimpleGenericTypesTestParser parser = new MCSimpleGenericTypesTestParser(); Optional<ASTMCBasicGenericType> ast = parser.parse_StringMCBasicGenericType("some.randomObject<List<Map<Optional<Set<String>>>>>"); assertTrue(ast.isPresent()); assertFalse(parser.hasErrors()); ASTMCBasicGenericType typeArgument = ast.get(); MCSimpleGenericTypesPrettyPrinter printer = new MCSimpleGenericTypesPrettyPrinter(new IndentPrinter()); String output = printer.prettyprint(ast.get()); ast = parser.parse_StringMCBasicGenericType(output); assertFalse(parser.hasErrors()); assertTrue(ast.isPresent()); assertTrue(typeArgument.deepEquals(ast.get())); }
public String prettyprint(ASTMCCustomTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); }
MCSimpleGenericTypesPrettyPrinter extends MCCollectionTypesPrettyPrinter implements MCSimpleGenericTypesVisitor { public String prettyprint(ASTMCCustomTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } }
MCSimpleGenericTypesPrettyPrinter extends MCCollectionTypesPrettyPrinter implements MCSimpleGenericTypesVisitor { public String prettyprint(ASTMCCustomTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCSimpleGenericTypesPrettyPrinter(IndentPrinter printer);  MCSimpleGenericTypesPrettyPrinter(IndentPrinter printer, MCSimpleGenericTypesVisitor realThis); }
MCSimpleGenericTypesPrettyPrinter extends MCCollectionTypesPrettyPrinter implements MCSimpleGenericTypesVisitor { public String prettyprint(ASTMCCustomTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCSimpleGenericTypesPrettyPrinter(IndentPrinter printer);  MCSimpleGenericTypesPrettyPrinter(IndentPrinter printer, MCSimpleGenericTypesVisitor realThis); @Override MCSimpleGenericTypesVisitor getRealThis(); @Override void setRealThis(MCSimpleGenericTypesVisitor realThis); void handle(ASTMCBasicGenericType node); void handle(ASTMCCustomTypeArgument node); String prettyprint(ASTMCCustomTypeArgument a); }
MCSimpleGenericTypesPrettyPrinter extends MCCollectionTypesPrettyPrinter implements MCSimpleGenericTypesVisitor { public String prettyprint(ASTMCCustomTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCSimpleGenericTypesPrettyPrinter(IndentPrinter printer);  MCSimpleGenericTypesPrettyPrinter(IndentPrinter printer, MCSimpleGenericTypesVisitor realThis); @Override MCSimpleGenericTypesVisitor getRealThis(); @Override void setRealThis(MCSimpleGenericTypesVisitor realThis); void handle(ASTMCBasicGenericType node); void handle(ASTMCCustomTypeArgument node); String prettyprint(ASTMCCustomTypeArgument a);  }