code: private static Field findAccessorField(Class<?> type, String name, Class<?> requiredType) {
          Class<?> current = type;
  
          while (current != null) {
              for (Field field : current.getDeclaredFields()) {
                  if (field.getName().equals(name)
                          && field.getType().equals(requiredType)
                          && !isStatic(field)
                          && !field.isSynthetic()
                          && (!isPrivate(field) || field.getDeclaringClass() == type)) {
                      return field;
                  }
              }
  
              current = current.getSuperclass();
          }
  
          return null;
      }
docs: Internal: Gets a {@link Field} with any valid modifier, evaluating its hierarchy.
  
  @param type         the class from where to search, cannot be null
  @param name         the name of the field to search, cannot be null
  @param requiredType the required type to match, cannot be null
  @return the field, if found, else {@code null}