Exemple #1
0
 private void checkInterceptorBindings() {
   if (interceptorMetadata.isEligible(
           org.jboss.weld.interceptor.spi.model.InterceptionType.POST_CONSTRUCT)
       || interceptorMetadata.isEligible(
           org.jboss.weld.interceptor.spi.model.InterceptionType.PRE_DESTROY)
       || interceptorMetadata.isEligible(
           org.jboss.weld.interceptor.spi.model.InterceptionType.POST_ACTIVATE)
       || interceptorMetadata.isEligible(
           org.jboss.weld.interceptor.spi.model.InterceptionType.PRE_PASSIVATE)) {
     for (Annotation interceptorBindingType : interceptorBindingTypes) {
       Target target = interceptorBindingType.annotationType().getAnnotation(Target.class);
       if (target != null
           && Arrays2.unorderedEquals(target.value(), ElementType.TYPE, ElementType.METHOD)) {
         throw ReflectionLogger.LOG.methodElementTypeNotAllowed(
             this, interceptorBindingType.annotationType());
       }
     }
   }
 }
Exemple #2
0
 @Override
 public boolean intercepts(InterceptionType type) {
   return interceptorMetadata.isEligible(
       org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(type.name()));
 }