code: public static Collection<Field> getDeepDeclaredFields(Class c)
      {
          if (_reflectedFields.containsKey(c))
          {
              return _reflectedFields.get(c);
          }
          Collection<Field> fields = new ArrayList<>();
          Class curr = c;
  
          while (curr != null)
          {
              getDeclaredFields(curr, fields);
              curr = curr.getSuperclass();
          }
          _reflectedFields.put(c, fields);
          return fields;
      }
docs: Get all non static, non transient, fields of the passed in class, including
  private fields. Note, the special this$ field is also not returned.  The result
  is cached in a static ConcurrentHashMap to benefit execution performance.
  @param c Class instance
  @return Collection of only the fields in the passed in class
  that would need further processing (reference fields).  This
  makes field traversal on a class faster as it does not need to
  continually process known fields like primitives.