code: private List<Field> getAllFields(List<Field> fields, Class<?> clazz) {
      // TODO consider caching the results of this.
      checkNotNull(fields);
      checkNotNull(clazz);
  
      fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
  
      if (clazz.getSuperclass() != null) {
        getAllFields(fields, clazz.getSuperclass());
      }
  
      return Collections.unmodifiableList(fields);
    }
docs: Return all declared and inherited fields for this class.
  
  @param fields
  @param clazz
  @return