コード例 #1
0
ファイル: DefinitionVisitor.java プロジェクト: ElliotCP/701A2
  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) {}
    }
  }