@Override public Node visit(final ExplicitConstructorInvocationStmt n, final A arg) { if (!n.isThis()) { if (n.getExpr() != null) { n.setExpr((Expression) n.getExpr().accept(this, arg)); } } final List<Type> typeArgs = n.getTypeArgs(); if (typeArgs != null) { for (int i = 0; i < typeArgs.size(); i++) { typeArgs.set(i, (Type) typeArgs.get(i).accept(this, arg)); } removeNulls(typeArgs); } final List<Expression> args = n.getArgs(); if (args != null) { for (int i = 0; i < args.size(); i++) { args.set(i, (Expression) args.get(i).accept(this, arg)); } removeNulls(args); } return n; }
@Override public Boolean visit(final ExplicitConstructorInvocationStmt n1, final Node arg) { final ExplicitConstructorInvocationStmt n2 = (ExplicitConstructorInvocationStmt) arg; if (!nodeEquals(n1.getExpr(), n2.getExpr())) { return Boolean.FALSE; } if (!nodesEquals(n1.getArgs(), n2.getArgs())) { return Boolean.FALSE; } if (!nodesEquals(n1.getTypeArgs(), n2.getTypeArgs())) { return Boolean.FALSE; } return Boolean.TRUE; }
@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); } } }
public void visit(ExplicitConstructorInvocationStmt n, Object 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(";"); }
@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(";"); }
@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; }