@Test public void testModifierSymbol() throws IOException { TestUMLModifierParser parser = new TestUMLModifierParser(); Optional<ASTModifier> result = parser.parseModifier(new StringReader("-")); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); ASTModifier modifier = result.get(); UMLModifierPrettyPrinter prettyPrinter = new UMLModifierPrettyPrinter(new IndentPrinter()); String output = prettyPrinter.prettyprint(modifier); result = parser.parseModifier(new StringReader(output)); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); assertTrue(modifier.deepEquals(result.get())); }
public String prettyprint(ASTUMLModifierNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); }
UMLModifierPrettyPrinter implements UMLModifierVisitor { public String prettyprint(ASTUMLModifierNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } }
UMLModifierPrettyPrinter implements UMLModifierVisitor { public String prettyprint(ASTUMLModifierNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } UMLModifierPrettyPrinter(IndentPrinter printer); }
UMLModifierPrettyPrinter implements UMLModifierVisitor { public String prettyprint(ASTUMLModifierNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } UMLModifierPrettyPrinter(IndentPrinter printer); @Override void handle(ASTModifier a); IndentPrinter getPrinter(); String prettyprint(ASTUMLModifierNode node); @Override void setRealThis(UMLModifierVisitor realThis); @Override UMLModifierVisitor getRealThis(); }
UMLModifierPrettyPrinter implements UMLModifierVisitor { public String prettyprint(ASTUMLModifierNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } UMLModifierPrettyPrinter(IndentPrinter printer); @Override void handle(ASTModifier a); IndentPrinter getPrinter(); String prettyprint(ASTUMLModifierNode node); @Override void setRealThis(UMLModifierVisitor realThis); @Override UMLModifierVisitor getRealThis();  }