@Test void supportsParameter_withNonStringParameterType_shouldReturnTrue() throws Exception { NotificationMessageArgumentResolver notificationMessageArgumentResolver = new NotificationMessageArgumentResolver( new StringMessageConverter()); Method methodWithWrongParameterType = this.getClass() .getDeclaredMethod("methodWithWrongParameterType", Long.class); MethodParameter methodParameter = new MethodParameter( methodWithWrongParameterType, 0); boolean result = notificationMessageArgumentResolver .supportsParameter(methodParameter); assertThat(result).isTrue(); }
@Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(NotificationMessage.class); }
NotificationMessageArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(NotificationMessage.class); } }
NotificationMessageArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(NotificationMessage.class); } NotificationMessageArgumentResolver(MessageConverter converter); }
NotificationMessageArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(NotificationMessage.class); } NotificationMessageArgumentResolver(MessageConverter converter); @Override boolean supportsParameter(MethodParameter parameter); @Override Object resolveArgument(MethodParameter par, Message<?> msg); }
NotificationMessageArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return parameter.hasParameterAnnotation(NotificationMessage.class); } NotificationMessageArgumentResolver(MessageConverter converter); @Override boolean supportsParameter(MethodParameter parameter); @Override Object resolveArgument(MethodParameter par, Message<?> msg);  }