docs: public static Optional<Method> findMethod(Class type, String name, Class... argumentTypes) {
          Class currentType = type;
          while (currentType != null) {
              Method[] methods = currentType.isInterface() ? currentType.getMethods() : currentType.getDeclaredMethods();
              for (Method method : methods) {
                  if (name.equals(method.getName()) && Arrays.equals(argumentTypes, method.getParameterTypes())) {
                      return Optional.of(method);
                  }
              }
              currentType = currentType.getSuperclass();
          }
          return Optional.empty();
      }