Refine search
/** * 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; }
@Override public boolean add(Annotation annotation) { if (contains(annotation)) { return false; } return set.add(annotation); }
/** * Extracts a flat set of interception bindings from a given set of interceptor bindings. * * @param addTopLevelInterceptorBindings add top level interceptor bindings to the result set. * @param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set. * @return */ public static Set<Annotation> flattenInterceptorBindings(EnhancedAnnotatedType<?> clazz, BeanManagerImpl beanManager, Collection<Annotation> annotations, boolean addTopLevelInterceptorBindings, boolean addInheritedInterceptorBindings) { Set<Annotation> flattenInterceptorBindings = new InterceptorBindingSet(beanManager); MetaAnnotationStore metaAnnotationStore = beanManager.getServices().get(MetaAnnotationStore.class); if (addTopLevelInterceptorBindings) { addInterceptorBindings(clazz, annotations, flattenInterceptorBindings, metaAnnotationStore); } if (addInheritedInterceptorBindings) { for (Annotation annotation : annotations) { addInheritedInterceptorBindings(clazz, annotation.annotationType(), metaAnnotationStore, flattenInterceptorBindings); } } return flattenInterceptorBindings; }
/** * Extracts a flat set of interception bindings from a given set of interceptor bindings. * * @param addTopLevelInterceptorBindings add top level interceptor bindings to the result set. * @param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set. * @return */ public static Set<Annotation> flattenInterceptorBindings(EnhancedAnnotatedType<?> clazz, BeanManagerImpl beanManager, Collection<Annotation> annotations, boolean addTopLevelInterceptorBindings, boolean addInheritedInterceptorBindings) { Set<Annotation> flattenInterceptorBindings = new InterceptorBindingSet(beanManager); MetaAnnotationStore metaAnnotationStore = beanManager.getServices().get(MetaAnnotationStore.class); if (addTopLevelInterceptorBindings) { addInterceptorBindings(clazz, annotations, flattenInterceptorBindings, metaAnnotationStore); } if (addInheritedInterceptorBindings) { for (Annotation annotation : annotations) { addInheritedInterceptorBindings(clazz, annotation.annotationType(), metaAnnotationStore, flattenInterceptorBindings); } } return flattenInterceptorBindings; }
/** * Extracts a flat set of interception bindings from a given set of interceptor bindings. * * @param addTopLevelInterceptorBindings add top level interceptor bindings to the result set. * @param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set. * @return */ public static Set<Annotation> flattenInterceptorBindings(BeanManagerImpl beanManager, Collection<Annotation> annotations, boolean addTopLevelInterceptorBindings, boolean addInheritedInterceptorBindings) { Set<Annotation> flattenInterceptorBindings = new InterceptorBindingSet(beanManager); if (addTopLevelInterceptorBindings) { for (Annotation annotation : annotations) { boolean added = flattenInterceptorBindings.add(annotation); if (!added) { throw BeanManagerLogger.LOG.duplicateInterceptorBinding(annotations); } } } if (addInheritedInterceptorBindings) { for (Annotation annotation : annotations) { addInheritedInterceptorBindings(annotation.annotationType(), beanManager.getServices().get(MetaAnnotationStore.class), flattenInterceptorBindings); } } return flattenInterceptorBindings; }
/** * 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; }
@Override public boolean add(Annotation annotation) { if (contains(annotation)) { return false; } return set.add(annotation); }
/** * Extracts a flat set of interception bindings from a given set of interceptor bindings. * * @param addTopLevelInterceptorBindings add top level interceptor bindings to the result set. * @param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set. * @return */ public static Set<Annotation> flattenInterceptorBindings(EnhancedAnnotatedType<?> clazz, BeanManagerImpl beanManager, Collection<Annotation> annotations, boolean addTopLevelInterceptorBindings, boolean addInheritedInterceptorBindings) { Set<Annotation> flattenInterceptorBindings = new InterceptorBindingSet(beanManager); MetaAnnotationStore metaAnnotationStore = beanManager.getServices().get(MetaAnnotationStore.class); if (addTopLevelInterceptorBindings) { addInterceptorBindings(clazz, annotations, flattenInterceptorBindings, metaAnnotationStore); } if (addInheritedInterceptorBindings) { for (Annotation annotation : annotations) { addInheritedInterceptorBindings(clazz, annotation.annotationType(), metaAnnotationStore, flattenInterceptorBindings); } } return flattenInterceptorBindings; }
/** * 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; }
@Override public boolean add(Annotation annotation) { if (contains(annotation)) { return false; } return set.add(annotation); }
/** * Extracts a flat set of interception bindings from a given set of interceptor bindings. * * @param addTopLevelInterceptorBindings add top level interceptor bindings to the result set. * @param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set. * @return */ public static Set<Annotation> flattenInterceptorBindings(EnhancedAnnotatedType<?> clazz, BeanManagerImpl beanManager, Collection<Annotation> annotations, boolean addTopLevelInterceptorBindings, boolean addInheritedInterceptorBindings) { Set<Annotation> flattenInterceptorBindings = new InterceptorBindingSet(beanManager); MetaAnnotationStore metaAnnotationStore = beanManager.getServices().get(MetaAnnotationStore.class); if (addTopLevelInterceptorBindings) { addInterceptorBindings(clazz, annotations, flattenInterceptorBindings, metaAnnotationStore); } if (addInheritedInterceptorBindings) { for (Annotation annotation : annotations) { addInheritedInterceptorBindings(clazz, annotation.annotationType(), metaAnnotationStore, flattenInterceptorBindings); } } return flattenInterceptorBindings; }
/** * 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; }
@Override public boolean add(Annotation annotation) { if (contains(annotation)) { return false; } return set.add(annotation); }
/** * Extracts a flat set of interception bindings from a given set of interceptor bindings. * * @param addTopLevelInterceptorBindings add top level interceptor bindings to the result set. * @param addInheritedInterceptorBindings add inherited level interceptor bindings to the result set. * @return */ public static Set<Annotation> flattenInterceptorBindings(EnhancedAnnotatedType<?> clazz, BeanManagerImpl beanManager, Collection<Annotation> annotations, boolean addTopLevelInterceptorBindings, boolean addInheritedInterceptorBindings) { Set<Annotation> flattenInterceptorBindings = new InterceptorBindingSet(beanManager); MetaAnnotationStore metaAnnotationStore = beanManager.getServices().get(MetaAnnotationStore.class); if (addTopLevelInterceptorBindings) { addInterceptorBindings(clazz, annotations, flattenInterceptorBindings, metaAnnotationStore); } if (addInheritedInterceptorBindings) { for (Annotation annotation : annotations) { addInheritedInterceptorBindings(clazz, annotation.annotationType(), metaAnnotationStore, flattenInterceptorBindings); } } return flattenInterceptorBindings; }
/** * 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; }
@Override public boolean add(Annotation annotation) { if (contains(annotation)) { return false; } return set.add(annotation); }
/** * 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; }
@Override public boolean add(Annotation annotation) { if (contains(annotation)) { return false; } return set.add(annotation); }