code: public static List<Field> getAllFields(Class<?> clazz) {
          final List<Field> ret = new ArrayList<>();
          do {
              ret.addAll(Arrays.asList(clazz.getDeclaredFields()));
              clazz = clazz.getSuperclass();
          } while (clazz != null);
          return ret;
      }
docs: Return a list of all {@link Field} in the class {@code clazz} and its base classes.
  @param clazz class to interrogate for {@link Field}
  @return list of all {@link Field} in the class {@code clazz} and its base classes