docs: public static Method getMostSpecificMethod(Method method, Class<?> targetClass) {
  
          if (method != null && isOverridable(method, targetClass) && targetClass != null
                  && targetClass != method.getDeclaringClass()) {
              try {
                  try {
                      return targetClass.getMethod(method.getName(), method.getParameterTypes());
                  } catch (NoSuchMethodException ex) {
                      return method;
                  }
              } catch (SecurityException ex) {
              }
          }
          return method;
      }