Class BeanConfiguratorBase<THIS extends BeanConfiguratorBase<THIS,T>,T>
- All Implemented Interfaces:
Consumer<org.jboss.jandex.AnnotationInstance>
- Direct Known Subclasses:
BeanConfigurator
-
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 io.quarkus.arc.processor.InterceptionProxyInfoprotected Stringprotected Integerprotected org.jboss.jandex.Typeprotected final Set<org.jboss.jandex.AnnotationInstance>protected booleanprotected ScopeInfoprotected Integerprotected 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().Declares that this synthetic bean has an injection point of typeInterceptionProxy<PT>, wherePTis the provider type of this bean.injectInterceptionProxy(Class<?> bindingsSource) Declares that this synthetic bean has an injection point of typeInterceptionProxy<PT>, wherePTis the provider type of this bean.injectInterceptionProxy(org.jboss.jandex.DotName bindingsSource) Declares that this synthetic bean has an injection point of typeInterceptionProxy<PT>, wherePTis the provider type of this bean.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) startup()Initialize the bean eagerly at application startup.startup(int priority) Initialize the bean eagerly at application startup.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, 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
-
startupPriority
-
interceptionProxy
protected io.quarkus.arc.processor.InterceptionProxyInfo interceptionProxy
-
-
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:
-
startup
Initialize the bean eagerly at application startup.- Parameters:
priority-- Returns:
- self
-
startup
Initialize the bean eagerly at application startup.- Returns:
- self
-
injectInterceptionProxy
Declares that this synthetic bean has an injection point of typeInterceptionProxy<PT>, wherePTis the provider type of this bean. An instance ofPTmay be used as a parameter toInterceptionProxy.create(Object)in the creator of this synthetic bean.The class of the provider type is scanned for interceptor binding annotations.
This method may only be called once. If called multiple times, the last call wins and the previous calls are lost.
- Returns:
- self
-
injectInterceptionProxy
Declares that this synthetic bean has an injection point of typeInterceptionProxy<PT>, wherePTis the provider type of this bean. An instance ofPTmay be used as a parameter toInterceptionProxy.create(Object)in the creator of this synthetic bean.If the
bindingsSourceis notnull, interceptor bindings on the class of the provider type are ignored; instead, thebindingsSourceclass is scanned for interceptor binding annotations as defined inBindingsSource.This method may only be called once. If called multiple times, the last call wins and the previous calls are lost.
- Parameters:
bindingsSource- the bindings source class, may benull- Returns:
- self
-
injectInterceptionProxy
Declares that this synthetic bean has an injection point of typeInterceptionProxy<PT>, wherePTis the provider type of this bean. An instance ofPTmay be used as a parameter toInterceptionProxy.create(Object)in the creator of this synthetic bean.If the
bindingsSourceis notnull, interceptor bindings on the class of the provider type are ignored; instead, thebindingsSourceclass is scanned for interceptor binding annotations as defined inBindingsSource.This method may only be called once. If called multiple times, the last call wins and the previous calls are lost.
- Parameters:
bindingsSource- the bindings source class, may benull- Returns:
- self
-
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)
-