code: public static Method findMethod(Class<?> clazz, String name, Class<?>... params) {
          try {
              return clazz.getMethod(name, params);
          } catch (NoSuchMethodException e) {
              Method[] methods = clazz.getMethods();
  
              for (Method candidate : methods) {
                  if (candidate.getName().equals(name) && w2pEquals(candidate.getParameterTypes(), params)) {
                      return candidate;
                  }
              }
  
              return null;
          }
      }
docs: Tries to find a method of the given name that is able to accept parameters of the given types. First tries to
  find the method matching the exact parameter types. If such a method does not exist, tries to find any (the first
  match of arbitrary order) method that is able to accept the parameter types by means of auto-boxing, i.e. a
  {@code Method(int)} would be returned for the parameters class {@code Integer.class}.
  <p>
  Returns {@code null} if no such method could be found.
  
  @param clazz
  the class which should be scanned for methods
  @param name
  the name of the method
  @param params
  the types of the method arguments
  
  @return A method that is able to accept parameters of the specified types, {@code null} if such a method could
  not be found.