docs: @SuppressWarnings("unchecked")
      private Method findPubliclyAccessibleMethod(Class root, String methodName) throws NoSuchMethodException {
          Class currentClass = root;
          while (currentClass != null) {
              String key = mkKey(currentClass, propertyName);
              Method method = METHOD_CACHE.get(key);
              if (method != null) {
                  return method;
              }
              if (Modifier.isPublic(currentClass.getModifiers())) {
                  //
                  // try a getter that takes DataFetchingEnvironment first
                  try {
                      method = currentClass.getMethod(methodName, DataFetchingEnvironment.class);
                      if (Modifier.isPublic(method.getModifiers())) {
                          METHOD_CACHE.putIfAbsent(key, method);
                          return method;
                      }
                  } catch (NoSuchMethodException e) {
                      // ok try the next approach
                  }
                  method = currentClass.getMethod(methodName);
                  if (Modifier.isPublic(method.getModifiers())) {
                      METHOD_CACHE.putIfAbsent(key, method);
                      return method;
                  }
              }
              currentClass = currentClass.getSuperclass();
          }
          return root.getMethod(methodName);
      }