@Test public void testMultipleMCCustomTypeArgument() throws IOException { String type = "java.util.List<socnet.Person<Konto>,List<boolean>>"; MCSimpleGenericTypesTestParser parser = new MCSimpleGenericTypesTestParser(); Optional<ASTMCType> ast = parser.parse_StringMCType(type); assertTrue(ast.isPresent()); assertFalse(parser.hasErrors()); Optional<ASTMCType> astBefore = ast; MCSimpleGenericTypesPrettyPrinter printer = new MCSimpleGenericTypesPrettyPrinter(new IndentPrinter()); String output = printer.prettyprint(ast.get()); assertEquals(type,output); ast = parser.parse_StringMCType(output); assertFalse(parser.hasErrors()); assertTrue(ast.isPresent()); assertTrue(astBefore.get().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);  }