@Test public void testReturnStatement() throws IOException { Optional<ASTSynchronizedStatement> result = parser.parse_StringSynchronizedStatement("synchronized (foo) { private Integer foo = a ;}"); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); ASTSynchronizedStatement ast = result.get(); String output = prettyPrinter.prettyprint(ast); result = parser.parse_StringSynchronizedStatement(output); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); assertTrue(ast.deepEquals(result.get())); }
public String prettyprint(ASTMCSynchronizedStatementsNode a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); }
MCSynchronizedStatementsPrettyPrinter extends MCCommonStatementsPrettyPrinter implements MCSynchronizedStatementsVisitor { public String prettyprint(ASTMCSynchronizedStatementsNode a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } }
MCSynchronizedStatementsPrettyPrinter extends MCCommonStatementsPrettyPrinter implements MCSynchronizedStatementsVisitor { public String prettyprint(ASTMCSynchronizedStatementsNode a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCSynchronizedStatementsPrettyPrinter(IndentPrinter out); }
MCSynchronizedStatementsPrettyPrinter extends MCCommonStatementsPrettyPrinter implements MCSynchronizedStatementsVisitor { public String prettyprint(ASTMCSynchronizedStatementsNode a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCSynchronizedStatementsPrettyPrinter(IndentPrinter out); @Override void handle(ASTSynchronizedStatement a); String prettyprint(ASTMCSynchronizedStatementsNode a); @Override void setRealThis(MCSynchronizedStatementsVisitor realThis); @Override MCSynchronizedStatementsVisitor getRealThis(); }
MCSynchronizedStatementsPrettyPrinter extends MCCommonStatementsPrettyPrinter implements MCSynchronizedStatementsVisitor { public String prettyprint(ASTMCSynchronizedStatementsNode a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCSynchronizedStatementsPrettyPrinter(IndentPrinter out); @Override void handle(ASTSynchronizedStatement a); String prettyprint(ASTMCSynchronizedStatementsNode a); @Override void setRealThis(MCSynchronizedStatementsVisitor realThis); @Override MCSynchronizedStatementsVisitor getRealThis();  }