T - public class BeanConfiguratorImpl<T> extends Object implements BeanConfigurator<T>
| Constructor and Description |
|---|
BeanConfiguratorImpl(Class<?> defaultBeanClass,
BeanDeploymentFinder beanDeploymentFinder) |
| Modifier and Type | Method and Description |
|---|---|
BeanConfigurator<T> |
addInjectionPoint(InjectionPoint injectionPoint)
Add an InjectionPoint to the configured bean
|
BeanConfigurator<T> |
addInjectionPoints(InjectionPoint... injectionPoints)
Add InjectionPoints to the configured bean
|
BeanConfigurator<T> |
addInjectionPoints(Set<InjectionPoint> injectionPoints)
Add InjectionPoints to the configured bean
|
BeanConfigurator<T> |
addQualifier(Annotation qualifier)
Add a qualifier to the configured bean
|
BeanConfigurator<T> |
addQualifiers(Annotation... qualifiers)
Add qualifiers to the bean.
|
BeanConfigurator<T> |
addQualifiers(Set<Annotation> qualifiers)
Add qualifiers to the bean.
|
BeanConfigurator<T> |
addStereotype(Class<? extends Annotation> stereotype)
Add a stereotype to the configured bean
|
BeanConfigurator<T> |
addStereotypes(Set<Class<? extends Annotation>> stereotypes)
Add stereotypes to the configured bean
|
BeanConfigurator<T> |
addTransitiveTypeClosure(Type type)
Adds an unrestricted set of bean types for the given type as if it represented a bean class of a managed bean.
|
BeanConfigurator<T> |
addType(Type type)
Add a type to the bean types
|
BeanConfigurator<T> |
addType(TypeLiteral<?> typeLiteral)
Add a type to the bean types
|
BeanConfigurator<T> |
addTypes(Set<Type> types)
Add types to the bean types
|
BeanConfigurator<T> |
addTypes(Type... types)
Add types to the bean types
|
BeanConfigurator<T> |
alternative(boolean alternative)
Change the alternative status of the configured bean.
|
BeanConfigurator<T> |
beanClass(Class<?> beanClass)
Set the class of the configured Bean.
|
<U extends T> |
createWith(java.util.function.Function<CreationalContext<U>,U> callback)
Set a
Function to create a bean instance from a CreationalContext |
BeanConfigurator<T> |
destroyWith(java.util.function.BiConsumer<T,CreationalContext<T>> callback)
Set a
BiConsumer to destroy a bean instance from a CreationalContext. |
BeanConfigurator<T> |
disposeWith(java.util.function.Consumer<T> callback)
Set a
Consumer to destroy a bean instance. |
BeanConfigurator<T> |
id(String id)
Make the configured bean implements
PassivationCapable and its Id for passivation. |
void |
initBeanManager(BeanDeploymentFinder beanDeploymentFinder) |
BeanConfigurator<T> |
injectionPoints(InjectionPoint... injectionPoints)
Replace InjectionPoints for the configured bean
|
BeanConfigurator<T> |
injectionPoints(Set<InjectionPoint> injectionPoints)
Replace InjectionPoints for the configured bean
|
BeanConfigurator<T> |
name(String name)
Set the name of the configured bean
|
<U extends T> |
produceWith(java.util.function.Function<Instance<Object>,U> callback)
|
<U extends T> |
produceWith(java.util.function.Supplier<U> callback)
Set a
Supplier to create a bean instance |
<U extends T> |
producing(U instance)
A shortcut for
produceWith(() -> existing where existing represents an instance whose lifecycle is not managed by CDI. |
BeanConfigurator<T> |
qualifiers(Annotation... qualifiers)
Replace all qualifiers.
|
BeanConfigurator<T> |
qualifiers(Set<Annotation> qualifiers)
Replace all qualifiers.
|
<U extends T> |
read(AnnotatedType<U> type)
Read the information from the given annotated type.
|
BeanConfigurator<T> |
read(BeanAttributes<?> beanAttributes)
Read the information from the given bean attributes.
|
BeanConfigurator<T> |
scope(Class<? extends Annotation> scope)
Replace Bean scope
|
BeanConfigurator<T> |
stereotypes(Set<Class<? extends Annotation>> stereotypes)
Replace stereotypes on the configured bean
|
BeanConfigurator<T> |
types(Set<Type> types)
Replace bean types
|
BeanConfigurator<T> |
types(Type... types)
Replace bean types
|
public BeanConfiguratorImpl(Class<?> defaultBeanClass, BeanDeploymentFinder beanDeploymentFinder)
defaultBeanClass - beanDeploymentFinder - public BeanConfigurator<T> beanClass(Class<?> beanClass)
BeanConfiguratorbeanClass in interface BeanConfigurator<T>beanClass - class of the configured beanpublic BeanConfigurator<T> addInjectionPoint(InjectionPoint injectionPoint)
BeanConfiguratoraddInjectionPoint in interface BeanConfigurator<T>injectionPoint - the injectionPoint to addpublic BeanConfigurator<T> addInjectionPoints(InjectionPoint... injectionPoints)
BeanConfiguratoraddInjectionPoints in interface BeanConfigurator<T>injectionPoints - the injectionPoints to addpublic BeanConfigurator<T> addInjectionPoints(Set<InjectionPoint> injectionPoints)
BeanConfiguratoraddInjectionPoints in interface BeanConfigurator<T>injectionPoints - the injectionPoints to addpublic BeanConfigurator<T> injectionPoints(InjectionPoint... injectionPoints)
BeanConfiguratorinjectionPoints in interface BeanConfigurator<T>injectionPoints - the injectionPoints for the configured beanpublic BeanConfigurator<T> injectionPoints(Set<InjectionPoint> injectionPoints)
BeanConfiguratorinjectionPoints in interface BeanConfigurator<T>injectionPoints - the injectionPoints for the configured beanpublic BeanConfigurator<T> id(String id)
BeanConfiguratorPassivationCapable and its Id for passivation.id in interface BeanConfigurator<T>id - forPassivationCapable.getId()public <U extends T> BeanConfigurator<U> createWith(java.util.function.Function<CreationalContext<U>,U> callback)
BeanConfiguratorFunction to create a bean instance from a CreationalContextcreateWith in interface BeanConfigurator<T>callback - the Function to create the instancepublic <U extends T> BeanConfigurator<U> produceWith(java.util.function.Supplier<U> callback)
BeanConfiguratorSupplier to create a bean instanceproduceWith in interface BeanConfigurator<T>callback - the Supplier to create the instancepublic <U extends T> BeanConfigurator<U> produceWith(java.util.function.Function<Instance<Object>,U> callback)
BeanConfiguratorproduceWith in interface BeanConfigurator<T>callback - the function to create the instancepublic <U extends T> BeanConfigurator<U> producing(U instance)
BeanConfiguratorproduceWith(() -> existing where existing represents an instance whose lifecycle is not managed by CDI.producing in interface BeanConfigurator<T>instance - use as produced instance for the configured beanpublic BeanConfigurator<T> destroyWith(java.util.function.BiConsumer<T,CreationalContext<T>> callback)
BeanConfiguratorBiConsumer to destroy a bean instance from a CreationalContext.
If no destroy callback is specified, a NOOP dispose callback is automatically set.destroyWith in interface BeanConfigurator<T>callback - the BiConsumer to destroy the instancepublic BeanConfigurator<T> disposeWith(java.util.function.Consumer<T> callback)
BeanConfiguratorConsumer to destroy a bean instance.
If no dispose callback is specified, a NOOP dispose callback is automatically set.disposeWith in interface BeanConfigurator<T>callback - the Consumer to dispose the instancepublic <U extends T> BeanConfigurator<U> read(AnnotatedType<U> type)
BeanConfiguratorread in interface BeanConfigurator<T>type - class to read information frompublic BeanConfigurator<T> read(BeanAttributes<?> beanAttributes)
BeanConfiguratorread in interface BeanConfigurator<T>beanAttributes - beanAttributes to read information frompublic BeanConfigurator<T> addType(Type type)
BeanConfiguratoraddType in interface BeanConfigurator<T>type - the type to addpublic BeanConfigurator<T> addType(TypeLiteral<?> typeLiteral)
BeanConfiguratoraddType in interface BeanConfigurator<T>typeLiteral - the type to addpublic BeanConfigurator<T> addTypes(Type... types)
BeanConfiguratoraddTypes in interface BeanConfigurator<T>types - types to addpublic BeanConfigurator<T> addTypes(Set<Type> types)
BeanConfiguratoraddTypes in interface BeanConfigurator<T>types - types to addpublic BeanConfigurator<T> addTransitiveTypeClosure(Type type)
BeanConfiguratoraddTransitiveTypeClosure in interface BeanConfigurator<T>type - to build the closure frompublic BeanConfigurator<T> types(Type... types)
BeanConfiguratortypes in interface BeanConfigurator<T>types - the types of the configured beanpublic BeanConfigurator<T> types(Set<Type> types)
BeanConfiguratortypes in interface BeanConfigurator<T>types - the types of the configured beanpublic BeanConfigurator<T> scope(Class<? extends Annotation> scope)
BeanConfiguratorscope in interface BeanConfigurator<T>scope - new scope for the configured beanpublic BeanConfigurator<T> addQualifier(Annotation qualifier)
BeanConfiguratoraddQualifier in interface BeanConfigurator<T>qualifier - qualifier to addpublic BeanConfigurator<T> addQualifiers(Annotation... qualifiers)
BeanConfiguratoraddQualifiers in interface BeanConfigurator<T>qualifiers - qualifiers to addpublic BeanConfigurator<T> addQualifiers(Set<Annotation> qualifiers)
BeanConfiguratoraddQualifiers in interface BeanConfigurator<T>qualifiers - qualifiers to addpublic BeanConfigurator<T> qualifiers(Annotation... qualifiers)
BeanConfiguratorqualifiers in interface BeanConfigurator<T>qualifiers - qualifiers for the build beanpublic BeanConfigurator<T> qualifiers(Set<Annotation> qualifiers)
BeanConfiguratorqualifiers in interface BeanConfigurator<T>qualifiers - for the configured beanpublic BeanConfigurator<T> addStereotype(Class<? extends Annotation> stereotype)
BeanConfiguratoraddStereotype in interface BeanConfigurator<T>stereotype - stereotype to addpublic BeanConfigurator<T> addStereotypes(Set<Class<? extends Annotation>> stereotypes)
BeanConfiguratoraddStereotypes in interface BeanConfigurator<T>stereotypes - stereotypes to addpublic BeanConfigurator<T> stereotypes(Set<Class<? extends Annotation>> stereotypes)
BeanConfiguratorstereotypes in interface BeanConfigurator<T>stereotypes - for the configured beanpublic BeanConfigurator<T> name(String name)
BeanConfiguratorname in interface BeanConfigurator<T>name - name for the configured beanpublic BeanConfigurator<T> alternative(boolean alternative)
BeanConfiguratoralternative in interface BeanConfigurator<T>alternative - value for alternative propertypublic void initBeanManager(BeanDeploymentFinder beanDeploymentFinder)
Copyright © 2016. All Rights Reserved.