@Test public void testCreatorExpression() throws IOException { Optional<ASTCreatorExpression> result = parser.parse_StringCreatorExpression("new Integer(a,b)"); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); ASTCreatorExpression ast = result.get(); String output = prettyPrinter.prettyprint(ast); assertEquals(" new (a,b)", output); }
public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); }
JavaClassExpressionsPrettyPrinter extends CommonExpressionsPrettyPrinter implements JavaClassExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } }
JavaClassExpressionsPrettyPrinter extends CommonExpressionsPrettyPrinter implements JavaClassExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } JavaClassExpressionsPrettyPrinter(IndentPrinter printer); }
JavaClassExpressionsPrettyPrinter extends CommonExpressionsPrettyPrinter implements JavaClassExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } JavaClassExpressionsPrettyPrinter(IndentPrinter printer); @Override void visit(ASTPrimarySuperExpression node); @Override void handle(ASTSuperSuffix node); @Override void handle(ASTSuperExpression node); @Override void handle(ASTClassExpression node); @Override void handle(ASTTypeCastExpression node); @Override void handle(ASTGenericInvocationSuffix node); @Override void handle(ASTGenericInvocationExpression node); @Override void handle(ASTPrimaryGenericInvocationExpression node); @Override void handle(ASTInstanceofExpression node); @Override void handle(ASTThisExpression node); @Override void handle(ASTArrayExpression node); @Override void visit(ASTPrimaryThisExpression node); @Override void handle(ASTArrayCreator a); @Override void handle(ASTArrayDimensionByExpression a); @Override void handle(ASTCreatorExpression a); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); String prettyprint(ASTGenericInvocationSuffix node); String prettyprint(ASTSuperSuffix node); @Override void setRealThis(JavaClassExpressionsVisitor realThis); @Override JavaClassExpressionsVisitor getRealThis(); }
JavaClassExpressionsPrettyPrinter extends CommonExpressionsPrettyPrinter implements JavaClassExpressionsVisitor { public String prettyprint(ASTExpression node) { getPrinter().clearBuffer(); node.accept(getRealThis()); return getPrinter().getContent(); } JavaClassExpressionsPrettyPrinter(IndentPrinter printer); @Override void visit(ASTPrimarySuperExpression node); @Override void handle(ASTSuperSuffix node); @Override void handle(ASTSuperExpression node); @Override void handle(ASTClassExpression node); @Override void handle(ASTTypeCastExpression node); @Override void handle(ASTGenericInvocationSuffix node); @Override void handle(ASTGenericInvocationExpression node); @Override void handle(ASTPrimaryGenericInvocationExpression node); @Override void handle(ASTInstanceofExpression node); @Override void handle(ASTThisExpression node); @Override void handle(ASTArrayExpression node); @Override void visit(ASTPrimaryThisExpression node); @Override void handle(ASTArrayCreator a); @Override void handle(ASTArrayDimensionByExpression a); @Override void handle(ASTCreatorExpression a); IndentPrinter getPrinter(); String prettyprint(ASTExpression node); String prettyprint(ASTGenericInvocationSuffix node); String prettyprint(ASTSuperSuffix node); @Override void setRealThis(JavaClassExpressionsVisitor realThis); @Override JavaClassExpressionsVisitor getRealThis();  }