@Test @SpecAssertions({ @SpecAssertion(section = INTERCEPTOR, id = "c"), @SpecAssertion(section = INTERCEPTOR, id = "e"), @SpecAssertion(section = INTERCEPTOR_EE, id = "a") }) public void testInterceptionType() { Interceptor<?> interceptorBean = getTransactionalInterceptor(); assertTrue(interceptorBean.intercepts(InterceptionType.AROUND_INVOKE)); assertFalse(interceptorBean.intercepts(InterceptionType.POST_ACTIVATE)); assertFalse(interceptorBean.intercepts(InterceptionType.POST_CONSTRUCT)); assertFalse(interceptorBean.intercepts(InterceptionType.PRE_DESTROY)); assertFalse(interceptorBean.intercepts(InterceptionType.PRE_PASSIVATE)); assertFalse(interceptorBean.intercepts(InterceptionType.AROUND_TIMEOUT)); }
@Override public boolean intercepts(InterceptionType type) { return delegate().intercepts(type); }
@Override public boolean intercepts(InterceptionType type) { return delegate().intercepts(type); }
@Override public boolean intercepts(InterceptionType type) { return delegate().intercepts(type); }
@Override public boolean intercepts(InterceptionType type) { return delegate().intercepts(type); }
@Override public boolean intercepts(InterceptionType type) { return delegate().intercepts(type); }
@Override public boolean intercepts(InterceptionType type) { return delegate().intercepts(type); }
public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings) { List<Interceptor<?>> interceptorList = new ArrayList<>(); for (Interceptor<?> interceptor : cdiInterceptors) { if (interceptor.intercepts(type) && intercepts(interceptor, interceptorBindings) && isInterceptorClassEnabled(interceptor.getBeanClass())) { interceptorList.add(interceptor); } } Collections.sort(interceptorList, new InterceptorComparator(webBeansContext)); return interceptorList; }
@Override public boolean isEligible(InterceptionType interceptionType) { return factory.getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name())); }
@Override public boolean isEligible(InterceptionType interceptionType) { return factory.getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name())); }
@Override public boolean isEligible(InterceptionType interceptionType) { return factory.getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name())); }
@Override public boolean isEligible(InterceptionType interceptionType) { return factory.getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name())); }
@Override public boolean isEligible(InterceptionType interceptionType) { return factory.getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name())); }
@Override public boolean isEligible(InterceptionType interceptionType) { return factory.getInterceptor().intercepts(javax.enterprise.inject.spi.InterceptionType.valueOf(interceptionType.name())); }
@Override protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) { return bean.intercepts(resolvable.getInterceptionType()) && bean.getInterceptorBindings().size() > 0 && Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager()) && manager.getEnabled().isInterceptorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) { return bean.intercepts(resolvable.getInterceptionType()) && Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager()) && manager.getEnabled().isInterceptorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) { return bean.intercepts(resolvable.getInterceptionType()) && Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager()) && manager.getEnabled().isInterceptorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) { return bean.intercepts(resolvable.getInterceptionType()) && Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager()) && manager.getEnabled().isInterceptorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) { return bean.intercepts(resolvable.getInterceptionType()) && Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager()) && manager.getEnabled().isInterceptorEnabled(bean.getBeanClass()); }
@Override protected boolean matches(InterceptorResolvable resolvable, Interceptor<?> bean) { return bean.intercepts(resolvable.getInterceptionType()) && Beans.containsAllInterceptionBindings(bean.getInterceptorBindings(), resolvable.getQualifiers(), getManager()) && manager.getEnabled().isInterceptorEnabled(bean.getBeanClass()); }