Refine search
/** * Initializes the name */ protected void initName(EnhancedAnnotated<T, ?> annotated) { boolean beanNameDefaulted = false; if (annotated.isAnnotationPresent(Named.class)) { String javaName = annotated.getAnnotation(Named.class).value(); if ("".equals(javaName)) { beanNameDefaulted = true; } else { this.name = javaName; return; } } if (beanNameDefaulted || (mergedStereotypes != null && mergedStereotypes.isBeanNameDefaulted())) { this.name = getDefaultName(annotated); } }
protected void initQualifiers(EnhancedAnnotated<?, ?> annotated) { initQualifiers(annotated.getMetaAnnotations(Qualifier.class)); }
scopes.addAll(clazz.getDeclaredMetaAnnotations(Scope.class)); scopes.addAll(clazz.getDeclaredMetaAnnotations(NormalScope.class)); validateScopeSet(scopes, annotated); if (scopes.size() == 1) { if (annotated.isAnnotationPresent(scopes.iterator().next().annotationType())) { this.scope = scopes.iterator().next().annotationType(); scopes.addAll(annotated.getMetaAnnotations(Scope.class)); scopes.addAll(annotated.getMetaAnnotations(NormalScope.class)); if (scopes.size() == 1) { this.scope = scopes.iterator().next().annotationType(); validateScopeSet(scopes, annotated); initScopeFromStereotype();
private BeanAttributesBuilder(EnhancedAnnotated<T, ?> annotated, InternalEjbDescriptor<T> descriptor, BeanManagerImpl manager) { this.manager = manager; this.annotated = annotated; initStereotypes(annotated, manager); initAlternative(annotated); initName(annotated); initQualifiers(annotated); initScope(annotated); if (descriptor == null) { types = SharedObjectCache.instance(manager).getSharedSet(Beans.getTypes(annotated)); } else { types = SharedObjectCache.instance(manager).getSharedSet(Beans.getTypes(annotated, descriptor)); } }
/** * Creates new {@link BeanAttributes} to represent a managed bean. */ public static <T> BeanAttributes<T> forBean(EnhancedAnnotated<T, ?> annotated, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, manager).build(); }
/** * Creates new {@link BeanAttributes} to represent a session bean. */ public static <T> BeanAttributes<T> forSessionBean(EnhancedAnnotatedType<T> annotated, InternalEjbDescriptor<?> descriptor, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, Reflections.<InternalEjbDescriptor<T>> cast(descriptor), manager).build(); }
public BeanAttributesBuilder(EnhancedAnnotated<T, ?> annotated, Set<Type> types, BeanManagerImpl manager) { this.manager = manager; this.annotated = annotated; initStereotypes(annotated, manager); initAlternative(annotated); initName(annotated); initQualifiers(annotated); initScope(annotated); this.types = types; }
/** * Creates new {@link BeanAttributes} to represent a managed bean. */ public static <T> BeanAttributes<T> forBean(EnhancedAnnotated<T, ?> annotated, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, null, manager).build(); }
public BeanAttributesBuilder(EnhancedAnnotated<T, ?> annotated, Set<Type> types, BeanManagerImpl manager) { this.manager = manager; this.annotated = annotated; initStereotypes(annotated, manager); initAlternative(annotated); initName(annotated); initQualifiers(annotated); initScope(annotated); this.types = types; }
/** * 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(); }
/** * Creates new {@link BeanAttributes} to represent a managed bean. */ public static <T> BeanAttributes<T> forBean(EnhancedAnnotated<T, ?> annotated, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, manager).build(); }
/** * Creates new {@link BeanAttributes} to represent a managed bean. */ public static <T> BeanAttributes<T> forBean(EnhancedAnnotated<T, ?> annotated, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, manager).build(); }
/** * Creates new {@link BeanAttributes} to represent a managed bean. */ public static <T> BeanAttributes<T> forBean(EnhancedAnnotated<T, ?> annotated, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, manager).build(); }
/** * Creates new {@link BeanAttributes} to represent a managed bean. */ public static <T> BeanAttributes<T> forBean(EnhancedAnnotated<T, ?> annotated, BeanManagerImpl manager) { return new BeanAttributesBuilder<T>(annotated, manager).build(); }
public BeanAttributesBuilder(EnhancedAnnotated<T, ?> annotated, Set<Type> types, BeanManagerImpl manager) { this.manager = manager; this.annotated = annotated; initStereotypes(annotated, manager); initAlternative(annotated); initName(annotated); initQualifiers(annotated); initScope(annotated); this.types = types; }
public BeanAttributesBuilder(EnhancedAnnotated<T, ?> annotated, Set<Type> types, BeanManagerImpl manager) { this.manager = manager; this.annotated = annotated; initStereotypes(annotated, manager); initAlternative(annotated); initName(annotated); initQualifiers(annotated); initScope(annotated); this.types = types; }
public BeanAttributesBuilder(EnhancedAnnotated<T, ?> annotated, Set<Type> types, BeanManagerImpl manager) { this.manager = manager; this.annotated = annotated; initStereotypes(annotated, manager); initAlternative(annotated); initName(annotated); initQualifiers(annotated); initScope(annotated); this.types = types; }
/** * Initializes the name */ protected void initName(EnhancedAnnotated<T, ?> annotated) { boolean beanNameDefaulted = false; if (annotated.isAnnotationPresent(Named.class)) { String javaName = annotated.getAnnotation(Named.class).value(); if ("".equals(javaName)) { beanNameDefaulted = true; } else { this.name = javaName; return; } } if (beanNameDefaulted || (mergedStereotypes != null && mergedStereotypes.isBeanNameDefaulted())) { this.name = getDefaultName(annotated); } }
scopes.addAll(clazz.getDeclaredMetaAnnotations(Scope.class)); scopes.addAll(clazz.getDeclaredMetaAnnotations(NormalScope.class)); validateScopeSet(scopes, annotated); if (scopes.size() == 1) { if (annotated.isAnnotationPresent(scopes.iterator().next().annotationType())) { this.scope = scopes.iterator().next().annotationType(); scopes.addAll(annotated.getMetaAnnotations(Scope.class)); scopes.addAll(annotated.getMetaAnnotations(NormalScope.class)); if (scopes.size() == 1) { this.scope = scopes.iterator().next().annotationType(); validateScopeSet(scopes, annotated); initScopeFromStereotype();
protected void initQualifiers(EnhancedAnnotated<?, ?> annotated) { initQualifiers(annotated.getMetaAnnotations(Qualifier.class)); }