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 ofBeanAttributes
used 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 String
getName()
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.boolean
isAlternative()
Determines if the bean is an alternative.String
toString()
-
-
-
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:BeanAttributes
Obtains the stereotypes of the bean.- Specified by:
getStereotypes
in interfaceBeanAttributes<T>
- Returns:
- the set of stereotypes
-
isAlternative
public boolean isAlternative()
Description copied from interface:BeanAttributes
Determines if the bean is an alternative. A custom implementation ofBean
may implementPrioritized
in order to be selected for the application.Prioritized.getPriority()
determines the priority used to resolve ambiguities.- Specified by:
isAlternative
in interfaceBeanAttributes<T>
- Returns:
true
if the bean is an alternative, andfalse
otherwise.
-
getName
public String getName()
Description copied from interface:BeanAttributes
Obtains the EL name of a bean, if it has one.- Specified by:
getName
in interfaceBeanAttributes<T>
- Returns:
- the EL name
-
getQualifiers
public Set<Annotation> getQualifiers()
Description copied from interface:BeanAttributes
Obtains the qualifiers of the bean.- Specified by:
getQualifiers
in interfaceBeanAttributes<T>
- Returns:
- the qualifiers
-
getTypes
public Set<Type> getTypes()
Description copied from interface:BeanAttributes
Obtains the bean types of the bean.- Specified by:
getTypes
in interfaceBeanAttributes<T>
- Returns:
- the bean types
-
getScope
public Class<? extends Annotation> getScope()
Description copied from interface:BeanAttributes
Obtains the scope of the bean.- Specified by:
getScope
in interfaceBeanAttributes<T>
- Returns:
- the scope
-
-