@Test public void testMCSetType() throws IOException { MCCollectionTypesTestParser parser = new MCCollectionTypesTestParser(); Optional<ASTMCSetType> ast = parser.parse_StringMCSetType("Set<de.monticore.ASTFoo>"); assertTrue(ast.isPresent()); assertFalse(parser.hasErrors()); ASTMCSetType setType = ast.get(); MCCollectionTypesPrettyPrinter printer = new MCCollectionTypesPrettyPrinter(new IndentPrinter()); String output = printer.prettyprint(ast.get()); ast = parser.parse_StringMCSetType(output); assertFalse(parser.hasErrors()); assertTrue(ast.isPresent()); assertTrue(setType.deepEquals(ast.get())); }
public String prettyprint(ASTMCTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); }
MCCollectionTypesPrettyPrinter extends MCBasicTypesPrettyPrinter implements MCCollectionTypesVisitor { public String prettyprint(ASTMCTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } }
MCCollectionTypesPrettyPrinter extends MCBasicTypesPrettyPrinter implements MCCollectionTypesVisitor { public String prettyprint(ASTMCTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCCollectionTypesPrettyPrinter(IndentPrinter printer); }
MCCollectionTypesPrettyPrinter extends MCBasicTypesPrettyPrinter implements MCCollectionTypesVisitor { public String prettyprint(ASTMCTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCCollectionTypesPrettyPrinter(IndentPrinter printer); @Override MCCollectionTypesVisitor getRealThis(); @Override void setRealThis(MCCollectionTypesVisitor realThis); @Override void handle(ASTMCListType a); @Override void handle(ASTMCOptionalType a); @Override void handle(ASTMCSetType a); @Override void handle(ASTMCMapType a); String prettyprint(ASTMCTypeArgument a); }
MCCollectionTypesPrettyPrinter extends MCBasicTypesPrettyPrinter implements MCCollectionTypesVisitor { public String prettyprint(ASTMCTypeArgument a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCCollectionTypesPrettyPrinter(IndentPrinter printer); @Override MCCollectionTypesVisitor getRealThis(); @Override void setRealThis(MCCollectionTypesVisitor realThis); @Override void handle(ASTMCListType a); @Override void handle(ASTMCOptionalType a); @Override void handle(ASTMCSetType a); @Override void handle(ASTMCMapType a); String prettyprint(ASTMCTypeArgument a);  }