private Set<Annotation> getMemberBindingAnnotations(Map<Class<? extends Annotation>, Annotation> classBindingAnnotations, Set<Annotation> memberAnnotations) { Set<Annotation> methodBindingAnnotations = flattenInterceptorBindings(manager, filterInterceptorBindings(manager, memberAnnotations), true, true); return ImmutableSet.copyOf(mergeMethodInterceptorBindings(classBindingAnnotations, methodBindingAnnotations).values()); }
/** * Merge class-level interceptor bindings with interceptor bindings inherited from interceptor bindings and stereotypes. */ public static Map<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, AnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) { Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(beanManager, filterInterceptorBindings(beanManager, clazz.getAnnotations()), true, false); Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>(); inheritedBindingAnnotations.addAll(flattenInterceptorBindings(beanManager, filterInterceptorBindings(beanManager, clazz.getAnnotations()), false, true)); for (Class<? extends Annotation> annotation : stereotypes) { inheritedBindingAnnotations.addAll(flattenInterceptorBindings(beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true)); } try { return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations); } catch (DeploymentException e) { throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass())); } }
/** * Merge class-level interceptor bindings with interceptor bindings inherited from interceptor bindings and stereotypes. */ public static Multimap<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, EnhancedAnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) { Set<Annotation> rawBindings = clazz.getMetaAnnotations(InterceptorBinding.class); Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), true, false); Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>(); inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), false, true)); for (Class<? extends Annotation> annotation : stereotypes) { inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true)); } try { return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations); } catch (DeploymentException e) { throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass())); } }
/** * Merge class-level interceptor bindings with interceptor bindings inherited from interceptor bindings and stereotypes. */ public static Multimap<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, EnhancedAnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) { Set<Annotation> rawBindings = clazz.getMetaAnnotations(InterceptorBinding.class); Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), true, false); Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>(); inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), false, true)); for (Class<? extends Annotation> annotation : stereotypes) { inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true)); } try { return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations); } catch (DeploymentException e) { throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass())); } }
/** * Merge class-level interceptor bindings with interceptor bindings inherited from interceptor bindings and stereotypes. */ public static Multimap<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, EnhancedAnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) { Set<Annotation> rawBindings = clazz.getMetaAnnotations(InterceptorBinding.class); Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), true, false); Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>(); inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), false, true)); for (Class<? extends Annotation> annotation : stereotypes) { inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true)); } try { return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations); } catch (DeploymentException e) { throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass())); } }
/** * Merge class-level interceptor bindings with interceptor bindings inherited from interceptor bindings and stereotypes. */ public static Multimap<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, EnhancedAnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) { Set<Annotation> rawBindings = clazz.getMetaAnnotations(InterceptorBinding.class); Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), true, false); Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>(); inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), false, true)); for (Class<? extends Annotation> annotation : stereotypes) { inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true)); } try { return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations); } catch (DeploymentException e) { throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass())); } }
/** * Merge class-level interceptor bindings with interceptor bindings inherited from interceptor bindings and stereotypes. */ public static Multimap<Class<? extends Annotation>, Annotation> mergeBeanInterceptorBindings(BeanManagerImpl beanManager, EnhancedAnnotatedType<?> clazz, Collection<Class<? extends Annotation>> stereotypes) { Set<Annotation> rawBindings = clazz.getMetaAnnotations(InterceptorBinding.class); Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), true, false); Set<Annotation> inheritedBindingAnnotations = new HashSet<Annotation>(); inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, rawBindings), false, true)); for (Class<? extends Annotation> annotation : stereotypes) { inheritedBindingAnnotations.addAll(flattenInterceptorBindings(clazz, beanManager, filterInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)), true, true)); } try { return mergeBeanInterceptorBindings(beanManager, clazz, classBindingAnnotations, inheritedBindingAnnotations); } catch (DeploymentException e) { throw new DefinitionException(BeanLogger.LOG.conflictingInterceptorBindings(clazz.getJavaClass())); } }
private Set<Annotation> getMemberBindingAnnotations(Multimap<Class<? extends Annotation>, Annotation> classBindingAnnotations, Set<Annotation> memberAnnotations) { Set<Annotation> methodBindingAnnotations = flattenInterceptorBindings(null, manager, filterInterceptorBindings(manager, memberAnnotations), true, true); return mergeMemberInterceptorBindings(classBindingAnnotations, methodBindingAnnotations).uniqueValues(); }
private Set<Annotation> getMemberBindingAnnotations(Multimap<Class<? extends Annotation>, Annotation> classBindingAnnotations, Set<Annotation> memberAnnotations) { Set<Annotation> methodBindingAnnotations = flattenInterceptorBindings(null, manager, filterInterceptorBindings(manager, memberAnnotations), true, true); return mergeMemberInterceptorBindings(classBindingAnnotations, methodBindingAnnotations).uniqueValues(); }
private Set<Annotation> getMemberBindingAnnotations(Multimap<Class<? extends Annotation>, Annotation> classBindingAnnotations, Set<Annotation> memberAnnotations) { Set<Annotation> methodBindingAnnotations = flattenInterceptorBindings(null, manager, filterInterceptorBindings(manager, memberAnnotations), true, true); return mergeMemberInterceptorBindings(classBindingAnnotations, methodBindingAnnotations).uniqueValues(); }
private Set<Annotation> getMemberBindingAnnotations(Multimap<Class<? extends Annotation>, Annotation> classBindingAnnotations, Set<Annotation> memberAnnotations) { Set<Annotation> methodBindingAnnotations = flattenInterceptorBindings(null, manager, filterInterceptorBindings(manager, memberAnnotations), true, true); return mergeMemberInterceptorBindings(classBindingAnnotations, methodBindingAnnotations).uniqueValues(); }
private Set<Annotation> getMemberBindingAnnotations(Multimap<Class<? extends Annotation>, Annotation> classBindingAnnotations, Set<Annotation> memberAnnotations) { Set<Annotation> methodBindingAnnotations = flattenInterceptorBindings(null, manager, filterInterceptorBindings(manager, memberAnnotations), true, true); return mergeMemberInterceptorBindings(classBindingAnnotations, methodBindingAnnotations).uniqueValues(); }