@Test public void testIsRetryFunctionMethod() { Assertions.assertThat(RetryHandlerUtils.isRetryFunctionMethod(getMethodByName(OrderService.class, "insert"))).isFalse(); Assertions.assertThat(RetryHandlerUtils.isRetryFunctionMethod(getMethodByName(OrderService.class, "payment"))).isFalse(); Assertions.assertThat(RetryHandlerUtils.isRetryFunctionMethod(getMethodByName(OrderService.class, "payment2"))).isTrue(); Assertions.assertThat(RetryHandlerUtils.isRetryFunctionMethod(getMethodByName(OrderService.class, "payment3"))).isFalse(); Assertions.assertThat(RetryHandlerUtils.isRetryFunctionMethod(getMethodByName(OrderService.class, "payment4"))).isFalse(); }
public static boolean isRetryFunctionMethod(Method method) { if (method.getAnnotation(RetryFunction.class) != null && method.getParameterCount() == 1) { return !Object.class.equals(method.getParameterTypes()[0]); } return false; }
RetryHandlerUtils { public static boolean isRetryFunctionMethod(Method method) { if (method.getAnnotation(RetryFunction.class) != null && method.getParameterCount() == 1) { return !Object.class.equals(method.getParameterTypes()[0]); } return false; } }
RetryHandlerUtils { public static boolean isRetryFunctionMethod(Method method) { if (method.getAnnotation(RetryFunction.class) != null && method.getParameterCount() == 1) { return !Object.class.equals(method.getParameterTypes()[0]); } return false; } private  RetryHandlerUtils(); }
RetryHandlerUtils { public static boolean isRetryFunctionMethod(Method method) { if (method.getAnnotation(RetryFunction.class) != null && method.getParameterCount() == 1) { return !Object.class.equals(method.getParameterTypes()[0]); } return false; } private  RetryHandlerUtils(); static boolean isRetryFunctionMethod(Method method); static void validateRetryHandler(Class<?> clazz); static void validateRetryFunction(Method method); static boolean isRetryHandlerMethod(Class<?> targetClass, Method method); static Type getRetryHandlerGenericInterface(Class<?> clazz); static String getMethodIdentity(Method method); }
RetryHandlerUtils { public static boolean isRetryFunctionMethod(Method method) { if (method.getAnnotation(RetryFunction.class) != null && method.getParameterCount() == 1) { return !Object.class.equals(method.getParameterTypes()[0]); } return false; } private  RetryHandlerUtils(); static boolean isRetryFunctionMethod(Method method); static void validateRetryHandler(Class<?> clazz); static void validateRetryFunction(Method method); static boolean isRetryHandlerMethod(Class<?> targetClass, Method method); static Type getRetryHandlerGenericInterface(Class<?> clazz); static String getMethodIdentity(Method method);  }