@Test void supportsParameter_withNotificationSubjectMethodParameter_shouldReturnTrue() throws Exception { NotificationSubjectArgumentResolver notificationSubjectArgumentResolver = new NotificationSubjectArgumentResolver(); Method methodWithNotificationSubjectArgument = this.getClass() .getDeclaredMethod("methodWithNotificationSubjectArgument", String.class); MethodParameter methodParameter = new MethodParameter( methodWithNotificationSubjectArgument, 0); boolean result = notificationSubjectArgumentResolver .supportsParameter(methodParameter); assertThat(result).isTrue(); }
@Override public boolean supportsParameter(MethodParameter parameter) { return (parameter.hasParameterAnnotation(NotificationSubject.class) && ClassUtils.isAssignable(String.class, parameter.getParameterType())); }
NotificationSubjectArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return (parameter.hasParameterAnnotation(NotificationSubject.class) && ClassUtils.isAssignable(String.class, parameter.getParameterType())); } }
NotificationSubjectArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return (parameter.hasParameterAnnotation(NotificationSubject.class) && ClassUtils.isAssignable(String.class, parameter.getParameterType())); } NotificationSubjectArgumentResolver(); }
NotificationSubjectArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return (parameter.hasParameterAnnotation(NotificationSubject.class) && ClassUtils.isAssignable(String.class, parameter.getParameterType())); } NotificationSubjectArgumentResolver(); @Override boolean supportsParameter(MethodParameter parameter); @Override Object resolveArgument(MethodParameter parameter, Message<?> message); }
NotificationSubjectArgumentResolver implements HandlerMethodArgumentResolver { @Override public boolean supportsParameter(MethodParameter parameter) { return (parameter.hasParameterAnnotation(NotificationSubject.class) && ClassUtils.isAssignable(String.class, parameter.getParameterType())); } NotificationSubjectArgumentResolver(); @Override boolean supportsParameter(MethodParameter parameter); @Override Object resolveArgument(MethodParameter parameter, Message<?> message);  }