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
FieldsModifier and TypeFieldDescriptionprotected Booleanprotected Consumer<io.quarkus.gizmo.MethodCreator>protected booleanprotected Consumer<io.quarkus.gizmo.MethodCreator>protected booleanprotected Stringprotected final org.jboss.jandex.DotNameprotected final Set<InjectionPointInfo.TypeAndQualifiers>protected Stringprotected Integerprotected org.jboss.jandex.Typeprotected final Set<org.jboss.jandex.AnnotationInstance>protected booleanprotected ScopeInfoprotected final List<StereotypeInfo>protected Stringprotected final Set<org.jboss.jandex.Type>Fields inherited from class io.quarkus.arc.processor.ConfiguratorBase
params -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.jboss.jandex.AnnotationInstance qualifier) addInjectionPoint(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers) Adds a synthetic injection point.addQualifier(Class<? extends Annotation> annotationClass) addQualifier(org.jboss.jandex.AnnotationInstance qualifier) addQualifier(org.jboss.jandex.DotName annotationName) addStereotype(StereotypeInfo stereotype) addType(org.jboss.jandex.DotName className) addType(org.jboss.jandex.Type type) alternative(boolean alternative) protected static <T> Tcreator(Class<? extends BeanCreator<U>> creatorClazz) The first method parameter is the synthetic creational context, i.e.destroyer(Class<? extends BeanDestroyer<U>> destroyerClazz) Forces the bean to be considered an 'application class', so it will be defined in the runtime ClassLoader and re-created on each redeployment.identifier(String identifier) The identifier becomes part of theBeanInfo.getIdentifier()andInjectableBean.getIdentifier().Unlike thename(String)method, a newNamedqualifier with the specified value is added to the configured bean.priority(int value) providerType(org.jboss.jandex.Type providerType) The provider type is the "real" type of the bean instance created viaInjectableReferenceProvider.get(CreationalContext).qualifiers(org.jboss.jandex.AnnotationInstance... qualifiers) read(BeanConfiguratorBase<?, ?> base) Read metadata from another configurator base.scope(Class<? extends Annotation> scope) stereotypes(StereotypeInfo... stereotypes) targetPackageName(String name) types(org.jboss.jandex.Type... types) 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 Details
-
identifier
-
implClazz
protected final org.jboss.jandex.DotName implClazz -
types
-
qualifiers
-
scope
-
alternative
-
stereotypes
-
name
-
creatorConsumer
-
destroyerConsumer
-
defaultBean
protected boolean defaultBean -
removable
protected boolean removable -
providerType
protected org.jboss.jandex.Type providerType -
forceApplicationClass
protected boolean forceApplicationClass -
targetPackageName
-
priority
-
injectionPoints
-
-
Constructor Details
-
BeanConfiguratorBase
protected BeanConfiguratorBase(org.jboss.jandex.DotName implClazz)
-
-
Method Details
-
read
Read metadata from another configurator base.- Parameters:
base-- Returns:
- self
-
types
-
types
-
addType
-
addType
-
addType
-
addQualifier
-
addQualifier
-
addQualifier
-
addQualifier
-
qualifiers
-
scope
-
scope
-
name
-
named
Unlike thename(String)method, a newNamedqualifier with the specified value is added to the configured bean.- Parameters:
name-- Returns:
- self
-
defaultBean
-
unremovable
-
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
-
targetPackageName
-
alternative
-
priority
-
addStereotype
-
stereotypes
-
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
-
addInjectionPoint
public THIS addInjectionPoint(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers) Adds a synthetic injection point. The injection point is validated at build time and is also considered when removing unused beans.- Parameters:
requiredType-requiredQualifiers-- Returns:
- self
- See Also:
-
creator
-
creator
The first method parameter is the synthetic creational context, i.e. theMethodCreator#getMethodParam(0)returns aSyntheticCreationalContextinstance that can be used to obtain contextual references for synthetic injection points and build-time parameters.Furthermore, the consumer can also read the instance field of name
paramsand typeMap. This map holds all parameters set via one of theBeanConfigurator#param()methods.- Parameters:
methodCreatorConsumer-- Returns:
- self
-
destroyer
-
destroyer
-
identifier
The identifier becomes part of theBeanInfo.getIdentifier()andInjectableBean.getIdentifier().An identifier can be used to register multiple synthetic beans with the same set of types and qualifiers.
- Parameters:
identifier-- Returns:
- self
- See Also:
-
cast
-
accept
public void accept(org.jboss.jandex.AnnotationInstance qualifier)
-