Package io.quarkus.arc.processor
Class BeanConfiguratorBase<B extends BeanConfiguratorBase<B,T>,T>
- java.lang.Object
-
- io.quarkus.arc.processor.BeanConfiguratorBase<B,T>
-
- All Implemented Interfaces:
Consumer<org.jboss.jandex.AnnotationInstance>
- Direct Known Subclasses:
BeanConfigurator
public abstract class BeanConfiguratorBase<B extends BeanConfiguratorBase<B,T>,T> extends Object 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 Map<String,Object>paramsprotected Integerpriorityprotected org.jboss.jandex.TypeproviderTypeprotected Set<org.jboss.jandex.AnnotationInstance>qualifiersprotected booleanremovableprotected ScopeInfoscopeprotected StringtargetPackageNameprotected Set<org.jboss.jandex.Type>types
-
Constructor Summary
Constructors Modifier Constructor Description protectedBeanConfiguratorBase(org.jboss.jandex.DotName implClazz)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccept(org.jboss.jandex.AnnotationInstance qualifier)QualifierConfigurator<B>addQualifier()BaddQualifier(Class<? extends Annotation> annotationClass)BaddQualifier(org.jboss.jandex.AnnotationInstance qualifier)BaddQualifier(org.jboss.jandex.DotName annotationName)BaddType(Class<?> type)BaddType(org.jboss.jandex.DotName className)BaddType(org.jboss.jandex.Type type)BalternativePriority(int value)protected static <T> Tcast(Object obj)<U extends T>
Bcreator(Class<? extends BeanCreator<U>> creatorClazz)<U extends T>
Bcreator(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)BdefaultBean()<U extends T>
Bdestroyer(Class<? extends BeanDestroyer<U>> destroyerClazz)<U extends T>
Bdestroyer(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)BforceApplicationClass()Forces the bean to be considered an 'application class', so it will be defined in the runtime ClassLoader and re-created on each redeployment.Bname(String name)Bnamed(String name)Unlike for thename(String)method a newNamedqualifier with the specified value is added to the configured bean.Bparam(String name, boolean value)Bparam(String name, double value)Bparam(String name, int value)Bparam(String name, long value)Bparam(String name, Class<?> value)Bparam(String name, String value)Bpriority(int value)BproviderType(org.jboss.jandex.Type providerType)The provider type is the "real" type of the bean instance created viaInjectableReferenceProvider.get(CreationalContext).Bqualifiers(org.jboss.jandex.AnnotationInstance... qualifiers)Bread(BeanConfiguratorBase<?,?> base)Read metadata from another configurator base.Bscope(ScopeInfo scope)Bscope(Class<? extends Annotation> scope)protected abstract Bself()BtargetPackageName(String name)Btypes(Class<?>... types)Btypes(org.jboss.jandex.Type... types)Bunremovable()
-
-
-
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
-
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
-
self
protected abstract B self()
-
read
public B read(BeanConfiguratorBase<?,?> base)
Read metadata from another configurator base.- Parameters:
base-- Returns:
- self
-
types
public B types(org.jboss.jandex.Type... types)
-
addType
public B addType(org.jboss.jandex.DotName className)
-
addType
public B addType(org.jboss.jandex.Type type)
-
addQualifier
public B addQualifier(Class<? extends Annotation> annotationClass)
-
addQualifier
public B addQualifier(org.jboss.jandex.DotName annotationName)
-
addQualifier
public B addQualifier(org.jboss.jandex.AnnotationInstance qualifier)
-
addQualifier
public QualifierConfigurator<B> addQualifier()
-
qualifiers
public B qualifiers(org.jboss.jandex.AnnotationInstance... qualifiers)
-
scope
public B scope(Class<? extends Annotation> scope)
-
named
public B 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 B defaultBean()
-
unremovable
public B unremovable()
-
forceApplicationClass
public B 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 B alternativePriority(int value)
-
priority
public B priority(int value)
-
providerType
public B 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> B creator(Class<? extends BeanCreator<U>> creatorClazz)
-
creator
public <U extends T> B creator(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)
-
destroyer
public <U extends T> B destroyer(Class<? extends BeanDestroyer<U>> destroyerClazz)
-
destroyer
public <U extends T> B destroyer(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)
-
cast
protected static <T> T cast(Object obj)
-
-