code: public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes)
    {
      try {
        clazz.getDeclaredMethod(methodName, parameterTypes);
        return true;
      }
      catch(SecurityException e) {
        throw new BugError(e);
      }
      catch(NoSuchMethodException expectable) {
        // ignore exception since is expected
      }
      return false;
    }
docs: Predicate to test if a class do possess a given method. Java language support for method discovery throws
  {@link NoSuchMethodException} if method not found. This method does not throws exception but returns a boolean.
  
  @param clazz reflexive class,
  @param methodName method name,
  @param parameterTypes formal parameters list.
  @return true if class has requested method.