/** * Constructor * * @param stereotypeAnnotations The stereotypes to merge */ protected MergedStereotypes(Set<Annotation> stereotypeAnnotations, BeanManagerImpl manager) { this.possibleScopeTypes = new HashSet<Annotation>(); this.stereotypes = new HashSet<Class<? extends Annotation>>(); this.manager = manager; merge(stereotypeAnnotations); this.stereotypes = SharedObjectCache.instance(manager).getSharedSet(stereotypes); }
/** * Constructor * * @param stereotypeAnnotations The stereotypes to merge */ protected MergedStereotypes(Set<Annotation> stereotypeAnnotations, BeanManagerImpl manager) { this.possibleScopeTypes = new HashSet<Annotation>(); this.stereotypes = new HashSet<Class<? extends Annotation>>(); this.manager = manager; merge(stereotypeAnnotations); this.stereotypes = SharedObjectCache.instance(manager).getSharedSet(stereotypes); }
public UnbackedAnnotatedConstructor(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Constructor<X> constructor, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.constructor = constructor; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedConstructor(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Constructor<X> constructor, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.constructor = constructor; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedMethod(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Method method, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.method = method; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedConstructor(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Constructor<X> constructor, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.constructor = constructor; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedMethod(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Method method, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.method = method; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedConstructor(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Constructor<X> constructor, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.constructor = constructor; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = immutableListView(parameters); }
public UnbackedAnnotatedMethod(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Method method, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.method = method; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedMethod(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Method method, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.method = method; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
public UnbackedAnnotatedConstructor(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations, UnbackedAnnotatedType<X> declaringType, List<AnnotatedParameter<X>> originalParameters, Constructor<X> constructor, SharedObjectCache cache) { super(baseType, typeClosure, cache.getSharedSet(annotations), declaringType); this.constructor = constructor; List<AnnotatedParameter<X>> parameters = new ArrayList<AnnotatedParameter<X>>(originalParameters.size()); for (AnnotatedParameter<X> originalParameter : originalParameters) { parameters.add(new UnbackedAnnotatedParameter<X>(originalParameter.getBaseType(), originalParameter.getTypeClosure(), cache.getSharedSet(originalParameter.getAnnotations()), originalParameter.getPosition(), this)); } this.parameters = ImmutableList.copyOf(parameters); }
protected void initDecoratedTypes() { Set<Type> decoratedTypes = new HashSet<Type>(getEnhancedAnnotated().getInterfaceClosure()); decoratedTypes.retainAll(getTypes()); decoratedTypes.remove(Serializable.class); this.decoratedTypes = SharedObjectCache.instance(beanManager).getSharedSet(decoratedTypes); this.decoratedMethods = new DecoratedMethods(beanManager, this); }
protected void initDecoratedTypes() { Set<Type> decoratedTypes = new HashSet<Type>(getEnhancedAnnotated().getInterfaceClosure()); decoratedTypes.retainAll(getTypes()); decoratedTypes.remove(Serializable.class); this.decoratedTypes = SharedObjectCache.instance(beanManager).getSharedSet(decoratedTypes); this.decoratedMethods = new DecoratedMethods(beanManager, this); }
protected void initDecoratedTypes() { Set<Type> decoratedTypes = new HashSet<Type>(getEnhancedAnnotated().getInterfaceClosure()); decoratedTypes.retainAll(getTypes()); decoratedTypes.remove(Serializable.class); this.decoratedTypes = SharedObjectCache.instance(beanManager).getSharedSet(decoratedTypes); this.decoratedMethods = new DecoratedMethods(beanManager, this); }
protected void initDecoratedTypes() { Set<Type> decoratedTypes = new HashSet<Type>(getEnhancedAnnotated().getInterfaceClosure()); decoratedTypes.retainAll(getTypes()); decoratedTypes.remove(Serializable.class); this.decoratedTypes = SharedObjectCache.instance(beanManager).getSharedSet(decoratedTypes); this.decoratedMethods = new DecoratedMethods(beanManager, this); }
protected void initDecoratedTypes() { Set<Type> decoratedTypes = new HashSet<Type>(getEnhancedAnnotated().getInterfaceClosure()); decoratedTypes.retainAll(getTypes()); decoratedTypes.remove(Serializable.class); this.decoratedTypes = SharedObjectCache.instance(beanManager).getSharedSet(decoratedTypes); this.decoratedMethods = new DecoratedMethods(beanManager, this); }
/** * Creates new {@link BeanAttributes} to represent a session bean. */ public static <T> BeanAttributes<T> createBeanAttributes(EnhancedAnnotatedType<T> annotated, InternalEjbDescriptor<?> descriptor, BeanManagerImpl manager) { final Set<Type> types = SharedObjectCache.instance(manager).getSharedSet(getSessionBeanTypes(annotated, Reflections.<InternalEjbDescriptor<T>> cast(descriptor))); return new BeanAttributesBuilder<T>(annotated, types, manager).build(); }
public static <X, Y extends X> AnnotatedField<X> of(AnnotatedField<X> originalField, UnbackedAnnotatedType<Y> declaringType, SharedObjectCache cache) { UnbackedAnnotatedType<X> downcastDeclaringType = cast(declaringType); return new UnbackedAnnotatedField<X>(originalField.getBaseType(), originalField.getTypeClosure(), cache.getSharedSet(originalField.getAnnotations()), originalField.getJavaMember(), downcastDeclaringType); }
public static <X, Y extends X> AnnotatedField<X> of(AnnotatedField<X> originalField, UnbackedAnnotatedType<Y> declaringType, SharedObjectCache cache) { UnbackedAnnotatedType<X> downcastDeclaringType = cast(declaringType); return new UnbackedAnnotatedField<X>(originalField.getBaseType(), originalField.getTypeClosure(), cache.getSharedSet(originalField.getAnnotations()), originalField.getJavaMember(), downcastDeclaringType); }
public static <X, Y extends X> AnnotatedField<X> of(AnnotatedField<X> originalField, UnbackedAnnotatedType<Y> declaringType, SharedObjectCache cache) { UnbackedAnnotatedType<X> downcastDeclaringType = cast(declaringType); return new UnbackedAnnotatedField<X>(originalField.getBaseType(), originalField.getTypeClosure(), cache.getSharedSet(originalField.getAnnotations()), originalField.getJavaMember(), downcastDeclaringType); }