Package io.quarkus.arc.processor
Class BeanConfiguratorBase<THIS extends BeanConfiguratorBase<THIS,T>,T>
- java.lang.Object
-
- io.quarkus.arc.processor.ConfiguratorBase<THIS>
-
- io.quarkus.arc.processor.BeanConfiguratorBase<THIS,T>
-
- All Implemented Interfaces:
Consumer<org.jboss.jandex.AnnotationInstance>
- Direct Known Subclasses:
BeanConfigurator
public abstract class BeanConfiguratorBase<THIS extends BeanConfiguratorBase<THIS,T>,T> extends ConfiguratorBase<THIS> implements Consumer<org.jboss.jandex.AnnotationInstance>
This construct is not thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description protected Booleanalternativeprotected Consumer<io.quarkus.gizmo.MethodCreator>creatorConsumerprotected booleandefaultBeanprotected Consumer<io.quarkus.gizmo.MethodCreator>destroyerConsumerprotected booleanforceApplicationClassprotected org.jboss.jandex.DotNameimplClazzprotected Stringnameprotected Integerpriorityprotected org.jboss.jandex.TypeproviderTypeprotected Set<org.jboss.jandex.AnnotationInstance>qualifiersprotected booleanremovableprotected ScopeInfoscopeprotected List<StereotypeInfo>stereotypesprotected StringtargetPackageNameprotected Set<org.jboss.jandex.Type>types-
Fields inherited from class io.quarkus.arc.processor.ConfiguratorBase
params
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBeanConfiguratorBase(org.jboss.jandex.DotName implClazz)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(org.jboss.jandex.AnnotationInstance qualifier)QualifierConfigurator<THIS>addQualifier()THISaddQualifier(Class<? extends Annotation> annotationClass)THISaddQualifier(org.jboss.jandex.AnnotationInstance qualifier)THISaddQualifier(org.jboss.jandex.DotName annotationName)THISaddStereotype(StereotypeInfo stereotype)THISaddType(Class<?> type)THISaddType(org.jboss.jandex.DotName className)THISaddType(org.jboss.jandex.Type type)THISalternativePriority(int value)protected static <T> Tcast(Object obj)<U extends T>
THIScreator(Class<? extends BeanCreator<U>> creatorClazz)THIScreator(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)THISdefaultBean()<U extends T>
THISdestroyer(Class<? extends BeanDestroyer<U>> destroyerClazz)THISdestroyer(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)THISforceApplicationClass()Forces the bean to be considered an 'application class', so it will be defined in the runtime ClassLoader and re-created on each redeployment.THISname(String name)THISnamed(String name)Unlike for thename(String)method a newNamedqualifier with the specified value is added to the configured bean.THISpriority(int value)THISproviderType(org.jboss.jandex.Type providerType)The provider type is the "real" type of the bean instance created viaInjectableReferenceProvider.get(CreationalContext).THISqualifiers(org.jboss.jandex.AnnotationInstance... qualifiers)THISread(BeanConfiguratorBase<?,?> base)Read metadata from another configurator base.THISscope(ScopeInfo scope)THISscope(Class<? extends Annotation> scope)THISstereotypes(StereotypeInfo... stereotypes)THIStargetPackageName(String name)THIStypes(Class<?>... types)THIStypes(org.jboss.jandex.Type... types)THISunremovable()-
Methods inherited from class io.quarkus.arc.processor.ConfiguratorBase
param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, param, read, self
-
-
-
-
Field Detail
-
implClazz
protected final org.jboss.jandex.DotName implClazz
-
types
protected final Set<org.jboss.jandex.Type> types
-
qualifiers
protected final Set<org.jboss.jandex.AnnotationInstance> qualifiers
-
scope
protected ScopeInfo scope
-
alternative
protected Boolean alternative
-
stereotypes
protected final List<StereotypeInfo> stereotypes
-
name
protected String name
-
creatorConsumer
protected Consumer<io.quarkus.gizmo.MethodCreator> creatorConsumer
-
destroyerConsumer
protected Consumer<io.quarkus.gizmo.MethodCreator> destroyerConsumer
-
defaultBean
protected boolean defaultBean
-
removable
protected boolean removable
-
providerType
protected org.jboss.jandex.Type providerType
-
forceApplicationClass
protected boolean forceApplicationClass
-
targetPackageName
protected String targetPackageName
-
priority
protected Integer priority
-
-
Method Detail
-
read
public THIS read(BeanConfiguratorBase<?,?> base)
Read metadata from another configurator base.- Parameters:
base-- Returns:
- self
-
types
public THIS types(org.jboss.jandex.Type... types)
-
addType
public THIS addType(org.jboss.jandex.DotName className)
-
addType
public THIS addType(org.jboss.jandex.Type type)
-
addQualifier
public THIS addQualifier(Class<? extends Annotation> annotationClass)
-
addQualifier
public THIS addQualifier(org.jboss.jandex.DotName annotationName)
-
addQualifier
public THIS addQualifier(org.jboss.jandex.AnnotationInstance qualifier)
-
addQualifier
public QualifierConfigurator<THIS> addQualifier()
-
qualifiers
public THIS qualifiers(org.jboss.jandex.AnnotationInstance... qualifiers)
-
scope
public THIS scope(Class<? extends Annotation> scope)
-
named
public THIS named(String name)
Unlike for thename(String)method a newNamedqualifier with the specified value is added to the configured bean.- Parameters:
name-- Returns:
- self
-
defaultBean
public THIS defaultBean()
-
unremovable
public THIS unremovable()
-
forceApplicationClass
public THIS forceApplicationClass()
Forces the bean to be considered an 'application class', so it will be defined in the runtime ClassLoader and re-created on each redeployment.- Returns:
- self
-
alternativePriority
public THIS alternativePriority(int value)
-
priority
public THIS priority(int value)
-
addStereotype
public THIS addStereotype(StereotypeInfo stereotype)
-
stereotypes
public THIS stereotypes(StereotypeInfo... stereotypes)
-
providerType
public THIS providerType(org.jboss.jandex.Type providerType)
The provider type is the "real" type of the bean instance created viaInjectableReferenceProvider.get(CreationalContext).The container attempts to derive the provider type from the implementation class. However, in some cases it's better to specify it manually.
- Parameters:
providerType-- Returns:
- self
-
creator
public <U extends T> THIS creator(Class<? extends BeanCreator<U>> creatorClazz)
-
destroyer
public <U extends T> THIS destroyer(Class<? extends BeanDestroyer<U>> destroyerClazz)
-
cast
protected static <T> T cast(Object obj)
-
-