Package org.jboss.weld.bean.attributes
Class ImmutableBeanAttributes<T>
- java.lang.Object
-
- org.jboss.weld.bean.attributes.ImmutableBeanAttributes<T>
-
- Type Parameters:
T- the class of the bean instance
- All Implemented Interfaces:
BeanAttributes<T>
- Direct Known Subclasses:
AbstractBuiltInBean.BuiltInBeanAttributes
public class ImmutableBeanAttributes<T> extends Object implements BeanAttributes<T>
Implementation ofBeanAttributesused by Weld.- Author:
- Jozef Hartinger
-
-
Constructor Summary
Constructors Constructor Description ImmutableBeanAttributes(Set<Annotation> qualifiers, String name, BeanAttributes<T> attributes)Utility constructor used for overriding Bean qualifiers and name for specialization purposes.ImmutableBeanAttributes(Set<Class<? extends Annotation>> stereotypes, boolean alternative, String name, Set<Annotation> qualifiers, Set<Type> types, Class<? extends Annotation> scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Obtains the EL name of a bean, if it has one.Set<Annotation>getQualifiers()Obtains the qualifiers of the bean.Class<? extends Annotation>getScope()Obtains the scope of the bean.Set<Class<? extends Annotation>>getStereotypes()Obtains the stereotypes of the bean.Set<Type>getTypes()Obtains the bean types of the bean.booleanisAlternative()Determines if the bean is an alternative.StringtoString()
-
-
-
Constructor Detail
-
ImmutableBeanAttributes
public ImmutableBeanAttributes(Set<Class<? extends Annotation>> stereotypes, boolean alternative, String name, Set<Annotation> qualifiers, Set<Type> types, Class<? extends Annotation> scope)
-
ImmutableBeanAttributes
public ImmutableBeanAttributes(Set<Annotation> qualifiers, String name, BeanAttributes<T> attributes)
Utility constructor used for overriding Bean qualifiers and name for specialization purposes.
-
-
Method Detail
-
getStereotypes
public Set<Class<? extends Annotation>> getStereotypes()
Description copied from interface:BeanAttributesObtains the stereotypes of the bean.- Specified by:
getStereotypesin interfaceBeanAttributes<T>- Returns:
- the set of stereotypes
-
isAlternative
public boolean isAlternative()
Description copied from interface:BeanAttributesDetermines if the bean is an alternative. A custom implementation ofBeanmay implementPrioritizedin order to be selected for the application.Prioritized.getPriority()determines the priority used to resolve ambiguities.- Specified by:
isAlternativein interfaceBeanAttributes<T>- Returns:
- true if the bean is an alternative, and false otherwise.
-
getName
public String getName()
Description copied from interface:BeanAttributesObtains the EL name of a bean, if it has one.- Specified by:
getNamein interfaceBeanAttributes<T>- Returns:
- the EL name
-
getQualifiers
public Set<Annotation> getQualifiers()
Description copied from interface:BeanAttributesObtains the qualifiers of the bean.- Specified by:
getQualifiersin interfaceBeanAttributes<T>- Returns:
- the qualifiers
-
getTypes
public Set<Type> getTypes()
Description copied from interface:BeanAttributesObtains the bean types of the bean.- Specified by:
getTypesin interfaceBeanAttributes<T>- Returns:
- the bean types
-
getScope
public Class<? extends Annotation> getScope()
Description copied from interface:BeanAttributesObtains the scope of the bean.- Specified by:
getScopein interfaceBeanAttributes<T>- Returns:
- the scope
-
-