public void visit(EnumDeclaration n, A arg) {
   if (n.getJavaDoc() != null) {
     n.getJavaDoc().accept(this, arg);
   }
   if (n.getAnnotations() != null) {
     for (AnnotationExpr a : n.getAnnotations()) {
       a.accept(this, arg);
     }
   }
   if (n.getImplements() != null) {
     for (ClassOrInterfaceType c : n.getImplements()) {
       c.accept(this, arg);
     }
   }
   if (n.getEntries() != null) {
     for (EnumConstantDeclaration e : n.getEntries()) {
       e.accept(this, arg);
     }
   }
   if (n.getMembers() != null) {
     for (BodyDeclaration member : n.getMembers()) {
       member.accept(this, arg);
     }
   }
 }
  public void visit(ClassOrInterfaceDeclaration n, A arg) {
    if (n.getJavaDoc() != null) {
      n.getJavaDoc().accept(this, arg);
    }
    if (n.getAnnotations() != null) {
      for (AnnotationExpr a : n.getAnnotations()) {
        a.accept(this, arg);
      }
    }
    if (n.getTypeParameters() != null) {
      for (TypeParameter t : n.getTypeParameters()) {
        t.accept(this, arg);
      }
    }
    if (n.getExtends() != null) {
      for (ClassOrInterfaceType c : n.getExtends()) {
        c.accept(this, arg);
      }
    }

    if (n.getImplements() != null) {
      for (ClassOrInterfaceType c : n.getImplements()) {
        c.accept(this, arg);
      }
    }
    if (n.getMembers() != null) {
      for (BodyDeclaration member : n.getMembers()) {
        member.accept(this, arg);
      }
    }
  }
 public void visit(AnnotationDeclaration n, A arg) {
   if (n.getJavaDoc() != null) {
     n.getJavaDoc().accept(this, arg);
   }
   if (n.getAnnotations() != null) {
     for (AnnotationExpr a : n.getAnnotations()) {
       a.accept(this, arg);
     }
   }
   if (n.getMembers() != null) {
     for (BodyDeclaration member : n.getMembers()) {
       member.accept(this, arg);
     }
   }
 }
 public void visit(EnumConstantDeclaration n, A arg) {
   if (n.getJavaDoc() != null) {
     n.getJavaDoc().accept(this, arg);
   }
   if (n.getAnnotations() != null) {
     for (AnnotationExpr a : n.getAnnotations()) {
       a.accept(this, arg);
     }
   }
   if (n.getArgs() != null) {
     for (Expression e : n.getArgs()) {
       e.accept(this, arg);
     }
   }
   if (n.getClassBody() != null) {
     for (BodyDeclaration member : n.getClassBody()) {
       member.accept(this, 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);
     }
   }
 }
Exemplo n.º 6
0
 private void printMembers(List<BodyDeclaration> members, Object arg) {
   for (BodyDeclaration member : members) {
     member.accept(this, arg);
   }
 }
Exemplo n.º 7
0
 final String javaDoc(BodyDeclaration node) {
   JavadocComment doc = node.getJavaDoc();
   return doc != null ? clip(doc) : null;
 }