code: public static boolean hasMethod(Class<?> targetClass, String methodName, Class... parameterTypes) {
          try {
              targetClass.getMethod(methodName, parameterTypes);
              return true;
          } catch (NoSuchMethodException e) {
              return false;
          }
      }
docs: Check if target class has the given method
  
  @param targetClass    target class
  @param methodName     method name
  @param parameterTypes method parameter types
  @return method availability