Esempio n. 1
0
  public void visit(ObjectCreationExpr n, Object arg) {
    if (n.getScope() != null) {
      n.getScope().accept(this, arg);
    }

    printTypeArgs(n.getTypeArgs(), arg);
    n.getType().accept(this, arg);

    if (n.getArgs() != null) {
      for (Iterator<Expression> i = n.getArgs().iterator(); i.hasNext(); ) {
        Expression e = i.next();
        e.accept(this, arg);
        if (i.hasNext()) {}
      }
    }

    if (n.getAnonymousClassBody() != null) {
      printMembers(n.getAnonymousClassBody(), arg);
    }
  }
 public void visit(ObjectCreationExpr n, A arg) {
   if (n.getScope() != null) {
     n.getScope().accept(this, arg);
   }
   if (n.getTypeArgs() != null) {
     for (Type t : n.getTypeArgs()) {
       t.accept(this, arg);
     }
   }
   n.getType().accept(this, arg);
   if (n.getArgs() != null) {
     for (Expression e : n.getArgs()) {
       e.accept(this, arg);
     }
   }
   if (n.getAnonymousClassBody() != null) {
     for (BodyDeclaration member : n.getAnonymousClassBody()) {
       member.accept(this, arg);
     }
   }
 }