@Test public void testStereoValue() throws IOException { TestUMLStereotypeParser parser = new TestUMLStereotypeParser(); Optional<ASTStereoValue> result = parser.parseStereoValue(new StringReader("s1=\"S1\"")); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); ASTStereoValue stereovalue = result.get(); UMLStereotypePrettyPrinter prettyPrinter = new UMLStereotypePrettyPrinter(new IndentPrinter()); String output = prettyPrinter.prettyprint(stereovalue); result = parser.parseStereoValue(new StringReader(output)); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); assertTrue(stereovalue.deepEquals(result.get())); }
public String prettyprint(ASTUMLStereotypeNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); }
UMLStereotypePrettyPrinter implements UMLStereotypeVisitor { public String prettyprint(ASTUMLStereotypeNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } }
UMLStereotypePrettyPrinter implements UMLStereotypeVisitor { public String prettyprint(ASTUMLStereotypeNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } UMLStereotypePrettyPrinter(IndentPrinter printer); }
UMLStereotypePrettyPrinter implements UMLStereotypeVisitor { public String prettyprint(ASTUMLStereotypeNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } UMLStereotypePrettyPrinter(IndentPrinter printer); @Override void handle(ASTStereotype a); @Override void handle(ASTStereoValue a); IndentPrinter getPrinter(); String prettyprint(ASTUMLStereotypeNode node); @Override void setRealThis(UMLStereotypeVisitor realThis); @Override UMLStereotypeVisitor getRealThis(); }
UMLStereotypePrettyPrinter implements UMLStereotypeVisitor { public String prettyprint(ASTUMLStereotypeNode node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } UMLStereotypePrettyPrinter(IndentPrinter printer); @Override void handle(ASTStereotype a); @Override void handle(ASTStereoValue a); IndentPrinter getPrinter(); String prettyprint(ASTUMLStereotypeNode node); @Override void setRealThis(UMLStereotypeVisitor realThis); @Override UMLStereotypeVisitor getRealThis();  }