code: private FieldDoc[] fields(boolean filter, boolean enumConstants) {
          List<FieldDocImpl> fields = List.nil();
          for (Symbol sym : tsym.members().getSymbols(NON_RECURSIVE)) {
              if (sym != null && sym.kind == VAR) {
                  VarSymbol s = (VarSymbol)sym;
                  boolean isEnum = ((s.flags() & Flags.ENUM) != 0) &&
                                   !env.legacyDoclet;
                  if (isEnum == enumConstants &&
                          (!filter || env.shouldDocument(s))) {
                      fields = fields.prepend(env.getFieldDoc(s));
                  }
              }
          }
          return fields.toArray(new FieldDocImpl[fields.length()]);
      }
docs: Return fields in class.
  @param filter  if true, return only the included fields
  @param enumConstants  if true, return the enum constants instead