@Override public void visit(final ExplicitConstructorInvocationStmt n, final A arg) { visitComment(n.getComment(), arg); if (!n.isThis()) { if (n.getExpr() != null) { n.getExpr().accept(this, arg); } } if (n.getTypeArgs() != null) { for (final Type t : n.getTypeArgs()) { t.accept(this, arg); } } if (n.getArgs() != null) { for (final Expression e : n.getArgs()) { e.accept(this, arg); } } }
@Override public Node visit(ExplicitConstructorInvocationStmt _n, Object _arg) { List<Type> typeArgs = visit(_n.getTypeArgs(), _arg); Expression expr = cloneNodes(_n.getExpr(), _arg); List<Expression> args = visit(_n.getArgs(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); ExplicitConstructorInvocationStmt r = new ExplicitConstructorInvocationStmt( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), typeArgs, _n.isThis(), expr, args ); r.setComment(comment); return r; }
@Override public void visit(final ExplicitConstructorInvocationStmt n, final Object arg) { printJavaComment(n.getComment(), arg); if (n.isThis()) { printTypeArgs(n.getTypeArgs(), arg); printer.print("this"); } else { if (n.getExpr() != null) { n.getExpr().accept(this, arg); printer.print("."); } printTypeArgs(n.getTypeArgs(), arg); printer.print("super"); } printArguments(n.getArgs(), arg); printer.print(";"); }