code: public static Field findField(Class<?> type, String name) {
          if (type == null) {
              throw new IllegalArgumentException("Method argument type must not be null");
          }
          if (name == null) {
              throw new IllegalArgumentException("Method argument name must not be null");
          }
  
          Class<?> c = type;
  
          do {
              for (Field f : c.getDeclaredFields()) {
                  if (name.equals(f.getName())) {
                      return f;
                  }
              }
              c = c.getSuperclass();
          } while (c != null);
  
          return null;
      }
docs: Rerturns the {@link Class#getDeclaredFields() declared field} with the given name.
  
  @param type must not be <code>null</code>.
  @param name must not be <code>null</code>.
  @return the field, or <code>null</code>