code: public static Field[] getFields (Class<?> clazz)
      {
          ArrayList<Field> list = new ArrayList<Field>();
          getFields(clazz, list);
          return list.toArray(new Field[list.size()]);
      }
docs: Get the fields contained in the class and its superclasses.