@SuppressWarnings("unchecked") @Test public void shouldRegisterInterceptorsOnRegistry() throws Exception { handler.handle(InterceptorA.class); verify(interceptorRegistry, times(1)).register(InterceptorA.class); }
public void handle(Class<?> type) { if (Interceptor.class.isAssignableFrom(type)) { registerInterceptor(type); } else { throw new VRaptorException("Annotation " + Intercepts.class + " found in " + type + ", but it is neither an Interceptor nor an InterceptorSequence."); } }
InterceptorStereotypeHandler implements StereotypeHandler { public void handle(Class<?> type) { if (Interceptor.class.isAssignableFrom(type)) { registerInterceptor(type); } else { throw new VRaptorException("Annotation " + Intercepts.class + " found in " + type + ", but it is neither an Interceptor nor an InterceptorSequence."); } } }
InterceptorStereotypeHandler implements StereotypeHandler { public void handle(Class<?> type) { if (Interceptor.class.isAssignableFrom(type)) { registerInterceptor(type); } else { throw new VRaptorException("Annotation " + Intercepts.class + " found in " + type + ", but it is neither an Interceptor nor an InterceptorSequence."); } } InterceptorStereotypeHandler(InterceptorRegistry registry); }
InterceptorStereotypeHandler implements StereotypeHandler { public void handle(Class<?> type) { if (Interceptor.class.isAssignableFrom(type)) { registerInterceptor(type); } else { throw new VRaptorException("Annotation " + Intercepts.class + " found in " + type + ", but it is neither an Interceptor nor an InterceptorSequence."); } } InterceptorStereotypeHandler(InterceptorRegistry registry); Class<? extends Annotation> stereotype(); void handle(Class<?> type); }
InterceptorStereotypeHandler implements StereotypeHandler { public void handle(Class<?> type) { if (Interceptor.class.isAssignableFrom(type)) { registerInterceptor(type); } else { throw new VRaptorException("Annotation " + Intercepts.class + " found in " + type + ", but it is neither an Interceptor nor an InterceptorSequence."); } } InterceptorStereotypeHandler(InterceptorRegistry registry); Class<? extends Annotation> stereotype(); void handle(Class<?> type);  }