public static boolean hasMethod(@NotNull Object target, @NotNull String methodName, Class<?>... parameterTypes) {
    try {
      target.getClass().getMethod(methodName, parameterTypes);
      return true;
    }
    catch (NoSuchMethodException | SecurityException e) {
      return false;
    }
  }
public static boolean hasMethod(@NotNull Object target, @NotNull String methodName, Class<?>... parameterTypes)