public Set<QualifierInstance> extractInterceptorBindingsForQualifierInstance(Iterable<QualifierInstance> annotations) { Set<QualifierInstance> foundInterceptionBindingTypes = new HashSet<QualifierInstance>(); for (QualifierInstance annotation : annotations) { if (isInterceptorBinding(annotation.getAnnotationClass())) { foundInterceptionBindingTypes.add(annotation); } } return foundInterceptionBindingTypes; }
public Set<QualifierInstance> extractInterceptorBindingsForQualifierInstance(Iterable<QualifierInstance> annotations) { Set<QualifierInstance> foundInterceptionBindingTypes = new HashSet<QualifierInstance>(); for (QualifierInstance annotation : annotations) { if (isInterceptorBinding(annotation.getAnnotationClass())) { foundInterceptionBindingTypes.add(annotation); } } return foundInterceptionBindingTypes; }
public Set<QualifierInstance> extractInterceptorBindingsForQualifierInstance(Iterable<QualifierInstance> annotations) { Set<QualifierInstance> foundInterceptionBindingTypes = new HashSet<QualifierInstance>(); for (QualifierInstance annotation : annotations) { if (isInterceptorBinding(annotation.getAnnotationClass())) { foundInterceptionBindingTypes.add(annotation); } } return foundInterceptionBindingTypes; }
public Set<QualifierInstance> extractInterceptorBindingsForQualifierInstance(Iterable<QualifierInstance> annotations) { Set<QualifierInstance> foundInterceptionBindingTypes = new HashSet<QualifierInstance>(); for (QualifierInstance annotation : annotations) { if (isInterceptorBinding(annotation.getAnnotationClass())) { foundInterceptionBindingTypes.add(annotation); } } return foundInterceptionBindingTypes; }
public Set<QualifierInstance> extractInterceptorBindingsForQualifierInstance(Iterable<QualifierInstance> annotations) { Set<QualifierInstance> foundInterceptionBindingTypes = new HashSet<QualifierInstance>(); for (QualifierInstance annotation : annotations) { if (isInterceptorBinding(annotation.getAnnotationClass())) { foundInterceptionBindingTypes.add(annotation); } } return foundInterceptionBindingTypes; }
public Set<QualifierInstance> extractInterceptorBindingsForQualifierInstance(Iterable<QualifierInstance> annotations) { Set<QualifierInstance> foundInterceptionBindingTypes = new HashSet<QualifierInstance>(); for (QualifierInstance annotation : annotations) { if (isInterceptorBinding(annotation.getAnnotationClass())) { foundInterceptionBindingTypes.add(annotation); } } return foundInterceptionBindingTypes; }
/** * Extracts a set of interceptor bindings from a collection of annotations. * @param beanManager * @param annotations * @return */ public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
/** * Extracts a set of interceptor bindings from a collection of annotations. * @param beanManager * @param annotations * @return */ public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
/** * Extracts a set of interceptor bindings from a collection of annotations. * @param beanManager * @param annotations * @return */ public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
/** * Extracts a set of interceptor bindings from a collection of annotations. * @param beanManager * @param annotations * @return */ public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
/** * Extracts a set of interceptor bindings from a collection of annotations. * @param beanManager * @param annotations * @return */ public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
/** * Extracts a set of interceptor bindings from a collection of annotations. * @param beanManager * @param annotations * @return */ public static Set<Annotation> filterInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations) { Set<Annotation> interceptorBindings = new InterceptorBindingSet(beanManager); for (Annotation annotation : annotations) { if (beanManager.isInterceptorBinding(annotation.annotationType())) { interceptorBindings.add(annotation); } } return interceptorBindings; }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
/** * Resolves a list of interceptors based on interception type and interceptor bindings. Transitive interceptor bindings of the interceptor bindings passed * as a parameter are considered in the resolution process. * * @param type The interception type to resolve * @param interceptorBindings The binding types to match * @return A list of matching interceptors * @see javax.enterprise.inject.spi.BeanManager#resolveInterceptors(javax.enterprise.inject.spi.InterceptionType, java.lang.annotation.Annotation[]) */ @Override public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings) { if (interceptorBindings.length == 0) { throw BeanManagerLogger.LOG.interceptorBindingsEmpty(); } for (Annotation annotation : interceptorBindings) { if (!isInterceptorBinding(annotation.annotationType())) { throw BeanManagerLogger.LOG.notInterceptorBindingType(annotation); } } Set<Annotation> flattenedInterceptorBindings = Interceptors.flattenInterceptorBindings(null, this, Arrays.asList(interceptorBindings), true, true); return resolveInterceptors(type, flattenedInterceptorBindings); }
/** * Resolves a list of interceptors based on interception type and interceptor bindings. Transitive interceptor bindings of the interceptor bindings passed * as a parameter are considered in the resolution process. * * @param type The interception type to resolve * @param interceptorBindings The binding types to match * @return A list of matching interceptors * @see javax.enterprise.inject.spi.BeanManager#resolveInterceptors(javax.enterprise.inject.spi.InterceptionType, java.lang.annotation.Annotation[]) */ @Override public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings) { if (interceptorBindings.length == 0) { throw BeanManagerLogger.LOG.interceptorBindingsEmpty(); } for (Annotation annotation : interceptorBindings) { if (!isInterceptorBinding(annotation.annotationType())) { throw BeanManagerLogger.LOG.notInterceptorBindingType(annotation); } } Set<Annotation> flattenedInterceptorBindings = Interceptors.flattenInterceptorBindings(null, this, Arrays.asList(interceptorBindings), true, true); return resolveInterceptors(type, flattenedInterceptorBindings); }