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);
     }
   }
 }
Example #2
0
  public void visit(EnumDeclaration n, Object arg) {
    if (n.getJavaDoc() != null) {
      n.getJavaDoc().accept(this, arg);
    }
    printMemberAnnotations(n.getAnnotations(), arg);
    printModifiers(n.getModifiers());

    if (n.getImplements() != null) {
      for (Iterator<ClassOrInterfaceType> i = n.getImplements().iterator(); i.hasNext(); ) {
        ClassOrInterfaceType c = i.next();
        c.accept(this, arg);
        if (i.hasNext()) {}
      }
    }

    if (n.getEntries() != null) {
      for (Iterator<EnumConstantDeclaration> i = n.getEntries().iterator(); i.hasNext(); ) {
        EnumConstantDeclaration e = i.next();
        e.accept(this, arg);
        if (i.hasNext()) {}
      }
    }
    if (n.getMembers() != null) {
      printMembers(n.getMembers(), arg);
    } else {
      if (n.getEntries() != null) {}
    }
  }