T - the class of the bean instancepublic final class BeanBuilderImpl<T> extends Object implements BeanBuilder<T>
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
alternative |
protected static String |
ARG_NAME |
protected static String |
ARG_QUALIFIER |
protected static String |
ARG_QUALIFIERS |
protected static String |
ARG_SCOPE |
protected static String |
ARG_STEREOTYPE |
protected static String |
ARG_STEREOTYPES |
protected static String |
ARG_TYPE |
protected static String |
ARG_TYPE_LITERAL |
protected static String |
ARG_TYPES |
protected String |
name |
protected Set<Annotation> |
qualifiers |
protected Class<? extends Annotation> |
scope |
protected Set<Class<? extends Annotation>> |
stereotypes |
protected Set<Type> |
types |
| Constructor and Description |
|---|
BeanBuilderImpl(Class<?> defaultBeanClass)
Constructs a builder which is not usable until the
beanDeploymentFinder is set. |
BeanBuilderImpl(Class<?> defaultBeanClass,
BeanDeploymentFinder beanDeploymentFinder) |
| Modifier and Type | Method and Description |
|---|---|
BeanBuilder<T> |
addInjectionPoint(InjectionPoint injectionPoint) |
BeanBuilder<T> |
addInjectionPoints(InjectionPoint... injectionPoints) |
BeanBuilder<T> |
addInjectionPoints(Set<InjectionPoint> injectionPoints) |
B |
addQualifier(Annotation qualifier) |
B |
addQualifiers(Annotation... qualifiers) |
B |
addQualifiers(Set<Annotation> qualifiers) |
B |
addStereotype(Class<? extends Annotation> stereotype) |
B |
addStereotypes(Set<Class<? extends Annotation>> stereotypes) |
B |
addTransitiveTypeClosure(Type type) |
B |
addType(Type type) |
B |
addType(TypeLiteral<?> typeLiteral) |
B |
addTypes(Set<Type> types) |
B |
addTypes(Type... types) |
B |
alternative() |
B |
alternative(boolean value) |
BeanBuilder<T> |
beanClass(Class<?> beanClass)
If not set, the extension class is used.
|
Bean<T> |
build() |
<U extends T> |
createWith(java.util.function.Function<CreationalContext<U>,U> callback) |
BeanBuilder<T> |
destroyWith(java.util.function.BiConsumer<T,CreationalContext<T>> callback) |
BeanBuilder<T> |
disposeWith(java.util.function.Consumer<T> callback) |
boolean |
hasQualifiers() |
boolean |
hasScope() |
BeanBuilder<T> |
id(String id) |
protected Set<Annotation> |
initQualifiers() |
BeanBuilder<T> |
injectionPoints(InjectionPoint... injectionPoints) |
BeanBuilder<T> |
injectionPoints(Set<InjectionPoint> injectionPoints) |
B |
name(String name) |
<U extends T> |
produceWith(java.util.function.Function<Instance<Object>,U> callback)
If no destroy callback is specified, a NOOP dispose callback is automatically set.
|
<U extends T> |
produceWith(java.util.function.Supplier<U> callback)
If no destroy callback is specified, a NOOP dispose callback is automatically set.
|
<U extends T> |
producing(U instance)
A shortcut for
produceWith(() -> existing where existing represents an instance whose lifecycle is not managed by CDI. |
B |
qualifiers(Annotation... qualifiers) |
B |
qualifiers(Set<Annotation> qualifiers) |
<U extends T> |
read(AnnotatedType<U> annotatedType)
Read the information from the given annotated type.
|
BeanBuilder<T> |
read(BeanAttributes<?> beanAttributes)
Read the information from the given bean attributes.
|
B |
scope(Class<? extends Annotation> scope) |
protected BeanBuilder<T> |
self() |
void |
setBeanDeploymentFinder(BeanDeploymentFinder beanDeploymentFinder) |
B |
stereotypes(Set<Class<? extends Annotation>> stereotypes) |
String |
toString() |
B |
types(Set<Type> types) |
B |
types(Type... types) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddQualifier, addQualifiers, addQualifiers, addStereotype, addStereotypes, addTransitiveTypeClosure, addType, addType, addTypes, addTypes, alternative, alternative, name, qualifiers, qualifiers, scope, stereotypes, types, typesprotected static final String ARG_SCOPE
protected static final String ARG_NAME
protected static final String ARG_TYPES
protected static final String ARG_TYPE
protected static final String ARG_TYPE_LITERAL
protected static final String ARG_QUALIFIERS
protected static final String ARG_QUALIFIER
protected static final String ARG_STEREOTYPES
protected static final String ARG_STEREOTYPE
protected String name
protected Set<Annotation> qualifiers
protected Class<? extends Annotation> scope
protected Set<Class<? extends Annotation>> stereotypes
protected Boolean alternative
public BeanBuilderImpl(Class<?> defaultBeanClass, BeanDeploymentFinder beanDeploymentFinder)
defaultBeanClass - beanDeploymentFinder - public BeanBuilderImpl(Class<?> defaultBeanClass)
beanDeploymentFinder is set.defaultBeanClass - public Bean<T> build()
build in interface BeanBuilder<T>public <U extends T> BeanBuilder<U> read(AnnotatedType<U> annotatedType)
BeanBuilderBeanBuilder.build() is invoked. At that time, the information is merged
with existing values. Values set manually have higher priority than read values.read in interface BeanBuilder<T>public BeanBuilder<T> read(BeanAttributes<?> beanAttributes)
BeanBuilderread in interface BeanBuilder<T>public BeanBuilder<T> beanClass(Class<?> beanClass)
BeanBuilderbeanClass in interface BeanBuilder<T>public BeanBuilder<T> addInjectionPoint(InjectionPoint injectionPoint)
addInjectionPoint in interface BeanBuilder<T>public BeanBuilder<T> addInjectionPoints(InjectionPoint... injectionPoints)
addInjectionPoints in interface BeanBuilder<T>public BeanBuilder<T> addInjectionPoints(Set<InjectionPoint> injectionPoints)
addInjectionPoints in interface BeanBuilder<T>public BeanBuilder<T> injectionPoints(InjectionPoint... injectionPoints)
injectionPoints in interface BeanBuilder<T>public BeanBuilder<T> injectionPoints(Set<InjectionPoint> injectionPoints)
injectionPoints in interface BeanBuilder<T>public BeanBuilder<T> id(String id)
id in interface BeanBuilder<T>PassivationCapable.getId()public <U extends T> BeanBuilder<U> createWith(java.util.function.Function<CreationalContext<U>,U> callback)
createWith in interface BeanBuilder<T>public <U extends T> BeanBuilder<U> produceWith(java.util.function.Function<Instance<Object>,U> callback)
BeanBuilderproduceWith in interface BeanBuilder<T>public <U extends T> BeanBuilder<U> produceWith(java.util.function.Supplier<U> callback)
BeanBuilderproduceWith in interface BeanBuilder<T>public <U extends T> BeanBuilder<U> producing(U instance)
BeanBuilderproduceWith(() -> existing where existing represents an instance whose lifecycle is not managed by CDI.producing in interface BeanBuilder<T>public BeanBuilder<T> destroyWith(java.util.function.BiConsumer<T,CreationalContext<T>> callback)
destroyWith in interface BeanBuilder<T>public BeanBuilder<T> disposeWith(java.util.function.Consumer<T> callback)
disposeWith in interface BeanBuilder<T>public void setBeanDeploymentFinder(BeanDeploymentFinder beanDeploymentFinder)
protected BeanBuilder<T> self()
public B addType(TypeLiteral<?> typeLiteral)
public B scope(Class<? extends Annotation> scope)
public boolean hasScope()
public B addQualifier(Annotation qualifier)
public B addQualifiers(Annotation... qualifiers)
public B addQualifiers(Set<Annotation> qualifiers)
public B qualifiers(Annotation... qualifiers)
public B qualifiers(Set<Annotation> qualifiers)
public boolean hasQualifiers()
public B addStereotype(Class<? extends Annotation> stereotype)
public B addStereotypes(Set<Class<? extends Annotation>> stereotypes)
public B stereotypes(Set<Class<? extends Annotation>> stereotypes)
public B alternative()
public B alternative(boolean value)
protected Set<Annotation> initQualifiers()
Copyright © 2015. All Rights Reserved.