public class NarrowingBeanBuilder<T> extends Object
ImmutableNarrowingBean and
ImmutablePassivationCapableNarrowingBean.ImmutableNarrowingBean,
ImmutablePassivationCapableNarrowingBean| Constructor and Description |
|---|
NarrowingBeanBuilder(javax.enterprise.inject.spi.Bean<Object> delegate,
javax.enterprise.inject.spi.BeanManager beanManager)
Instantiate a new
NarrowingBeanBuilder. |
| Modifier and Type | Method and Description |
|---|---|
NarrowingBeanBuilder<T> |
addQualifier(Annotation qualifier)
Add to the qualifiers used for bean creation.
|
NarrowingBeanBuilder<T> |
addQualifiers(Annotation... qualifiers)
Add to the qualifiers used for bean creation.
|
NarrowingBeanBuilder<T> |
addQualifiers(Collection<Annotation> qualifiers)
Add to the qualifiers used for bean creation.
|
NarrowingBeanBuilder<T> |
addType(Type type)
Add to the type closure used for bean creation.
|
NarrowingBeanBuilder<T> |
addTypes(Collection<Type> types)
Add to the type closure used for bean creation.
|
NarrowingBeanBuilder<T> |
addTypes(Type... types)
Add to the type closure used for bean creation.
|
NarrowingBeanBuilder<T> |
alternative(boolean alternative)
Define that the created bean will (or will not) be an alternative.
|
ImmutableNarrowingBean<T> |
create()
Use the bean builder's current state to define the bean.
|
String |
getId()
The id currently defined for bean creation.
|
String |
getName()
The name of the bean currently defined for bean creation.
|
Set<Annotation> |
getQualifiers()
Qualifiers currently defined for bean creation.
|
Class<? extends Annotation> |
getScope()
Scope currently defined for bean creation.
|
Set<Class<? extends Annotation>> |
getStereotypes()
Stereotypes currently defined for bean creation.
|
String |
getToString()
The string used when
Object.toString() is called on the bean. |
Set<Type> |
getTypes()
Type closure currently defined for bean creation.
|
NarrowingBeanBuilder<T> |
id(String id)
Define the id used for bean creation.
|
boolean |
isAlternative()
Whether the created bean will be an alternative.
|
boolean |
isNullable()
Whether the created bean will be nullable.
|
boolean |
isPassivationCapable()
Whether the created bean will be passivation capable.
|
NarrowingBeanBuilder<T> |
name(String name)
Define the name of the bean used for bean creation.
|
NarrowingBeanBuilder<T> |
nullable(boolean nullable)
Define that the created bean will (or will not) be nullable.
|
static <T> NarrowingBeanBuilder<T> |
of(javax.enterprise.inject.spi.Bean<Object> delegate,
javax.enterprise.inject.spi.BeanManager beanManager)
Create a new
NarrowingBeanBuilder, allowing Java to infer the type
T. |
NarrowingBeanBuilder<T> |
passivationCapable(boolean passivationCapable)
Define that the created bean will (or will not) be passivation capable.
|
NarrowingBeanBuilder<T> |
qualifiers(Annotation... qualifiers)
Define the qualifiers used for bean creation.
|
NarrowingBeanBuilder<T> |
qualifiers(Set<Annotation> qualifiers)
Define the qualifiers used for bean creation.
|
NarrowingBeanBuilder<T> |
readFromType(javax.enterprise.inject.spi.AnnotatedType<T> type)
Read the
AnnotatedType, creating a narrowing bean from the class
and its annotations. |
NarrowingBeanBuilder<T> |
scope(Class<? extends Annotation> scope)
Define the scope used for bean creation.
|
NarrowingBeanBuilder<T> |
stereotypes(Set<Class<? extends Annotation>> stereotypes)
Define the stereotypes used for bean creation.
|
NarrowingBeanBuilder<T> |
toString(String toString)
Define the string used when
Object.toString() is called on the bean. |
NarrowingBeanBuilder<T> |
types(Set<Type> types)
Define the type closure used for bean creation.
|
NarrowingBeanBuilder<T> |
types(Type... types)
Define the type closure used for bean creation.
|
public NarrowingBeanBuilder(javax.enterprise.inject.spi.Bean<Object> delegate, javax.enterprise.inject.spi.BeanManager beanManager)
NarrowingBeanBuilder.delegate - the delegate beanpublic static <T> NarrowingBeanBuilder<T> of(javax.enterprise.inject.spi.Bean<Object> delegate, javax.enterprise.inject.spi.BeanManager beanManager)
NarrowingBeanBuilder, allowing Java to infer the type
T.T - the type of the beandelegate - the delegate beanpublic NarrowingBeanBuilder<T> readFromType(javax.enterprise.inject.spi.AnnotatedType<T> type)
Read the AnnotatedType, creating a narrowing bean from the class
and its annotations.
type - the type to readpublic Set<Type> getTypes()
public NarrowingBeanBuilder<T> types(Set<Type> types)
types - the type closure to usepublic NarrowingBeanBuilder<T> types(Type... types)
types - the type closure to usepublic NarrowingBeanBuilder<T> addType(Type type)
type - additional type to usepublic NarrowingBeanBuilder<T> addTypes(Type... types)
types - the additional types to usepublic NarrowingBeanBuilder<T> addTypes(Collection<Type> types)
types - the additional types to usepublic Set<Annotation> getQualifiers()
public NarrowingBeanBuilder<T> qualifiers(Set<Annotation> qualifiers)
qualifiers - the qualifiers to usepublic NarrowingBeanBuilder<T> qualifiers(Annotation... qualifiers)
qualifiers - the qualifiers to usepublic NarrowingBeanBuilder<T> addQualifier(Annotation qualifier)
qualifiers - the additional qualifier to usepublic NarrowingBeanBuilder<T> addQualifiers(Annotation... qualifiers)
qualifiers - the additional qualifiers to usepublic NarrowingBeanBuilder<T> addQualifiers(Collection<Annotation> qualifiers)
qualifiers - the additional qualifiers to usepublic String getName()
null if the bean has no namepublic NarrowingBeanBuilder<T> name(String name)
name - the name of the bean to use or null if the bean
should have no namepublic Class<? extends Annotation> getScope()
public NarrowingBeanBuilder<T> scope(Class<? extends Annotation> scope)
scope - the scope to usepublic boolean isAlternative()
true if the created bean will be an alternative,
otherwise falsepublic NarrowingBeanBuilder<T> alternative(boolean alternative)
alternative - true if the created bean should be an
alternative, otherwise falsepublic Set<Class<? extends Annotation>> getStereotypes()
public NarrowingBeanBuilder<T> stereotypes(Set<Class<? extends Annotation>> stereotypes)
stereotypes - the stereotypes to usepublic ImmutableNarrowingBean<T> create()
Use the bean builder's current state to define the bean.
public String getToString()
Object.toString() is called on the bean.public NarrowingBeanBuilder<T> toString(String toString)
Object.toString() is called on the bean.toString - the string to usepublic boolean isNullable()
true if the created bean will be nullable, otherwise
falsepublic NarrowingBeanBuilder<T> nullable(boolean nullable)
nullable - true if the created bean should be nullable,
otherwise falsepublic boolean isPassivationCapable()
true if the created bean will be passivation capable,
otherwise falsepublic NarrowingBeanBuilder<T> passivationCapable(boolean passivationCapable)
nullable - true if the created bean should be
passivation capable, otherwise falsepublic String getId()
public NarrowingBeanBuilder<T> id(String id)
id - the id to useCopyright © 2008-2013 Seam Framework. All Rights Reserved.