public abstract class BaseImmutableBean<T> extends Object implements javax.enterprise.inject.spi.Bean<T>
A base class for implementing Bean
. The attributes are immutable, and
collections are defensively copied on instantiation. It uses the defaults
from the specification for properties if not specified.
This class does not provide any bean lifecycle operations
ImmutableBeanWrapper
Constructor and Description |
---|
BaseImmutableBean(Class<?> beanClass,
String name,
Set<java.lang.annotation.Annotation> qualifiers,
Class<? extends java.lang.annotation.Annotation> scope,
Set<Class<? extends java.lang.annotation.Annotation>> stereotypes,
Set<Type> types,
boolean alternative,
boolean nullable,
Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints,
String toString)
Create a new, immutable bean.
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getBeanClass() |
Set<javax.enterprise.inject.spi.InjectionPoint> |
getInjectionPoints() |
String |
getName() |
Set<java.lang.annotation.Annotation> |
getQualifiers() |
Class<? extends java.lang.annotation.Annotation> |
getScope() |
Set<Class<? extends java.lang.annotation.Annotation>> |
getStereotypes() |
Set<Type> |
getTypes() |
boolean |
isAlternative() |
boolean |
isNullable() |
String |
toString() |
public BaseImmutableBean(Class<?> beanClass, String name, Set<java.lang.annotation.Annotation> qualifiers, Class<? extends java.lang.annotation.Annotation> scope, Set<Class<? extends java.lang.annotation.Annotation>> stereotypes, Set<Type> types, boolean alternative, boolean nullable, Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints, String toString)
beanClass
- The Bean class, may not be nullname
- The bean namequalifiers
- The bean's qualifiers, if null, a singleton set of
Default
is usedscope
- The bean's scope, if null, the default scope of
Dependent
is usedstereotypes
- The bean's stereotypes, if null, an empty set is usedtypes
- The bean's types, if null, the beanClass and Object
will be usedalternative
- True if the bean is an alternativenullable
- True if the bean is nullableinjectionPoints
- the bean's injection points, if null an empty set is usedtoString
- the string which should be returned by #toString()
IllegalArgumentException
- if the beanClass is nullpublic Class<?> getBeanClass()
getBeanClass
in interface javax.enterprise.inject.spi.Bean<T>
public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
getInjectionPoints
in interface javax.enterprise.inject.spi.Bean<T>
public String getName()
getName
in interface javax.enterprise.inject.spi.Bean<T>
public Set<java.lang.annotation.Annotation> getQualifiers()
getQualifiers
in interface javax.enterprise.inject.spi.Bean<T>
public Class<? extends java.lang.annotation.Annotation> getScope()
getScope
in interface javax.enterprise.inject.spi.Bean<T>
public Set<Class<? extends java.lang.annotation.Annotation>> getStereotypes()
getStereotypes
in interface javax.enterprise.inject.spi.Bean<T>
public Set<Type> getTypes()
getTypes
in interface javax.enterprise.inject.spi.Bean<T>
public boolean isAlternative()
isAlternative
in interface javax.enterprise.inject.spi.Bean<T>
public boolean isNullable()
isNullable
in interface javax.enterprise.inject.spi.Bean<T>
Copyright © 2015 The Apache Software Foundation. All rights reserved.