Class BeanConfiguratorBase<B extends BeanConfiguratorBase<B,​T>,​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 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
      • alternative

        protected boolean alternative
      • 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
    • Constructor Detail

      • BeanConfiguratorBase

        protected BeanConfiguratorBase​(org.jboss.jandex.DotName implClazz)
    • 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​(Class<?>... types)
      • 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)
      • addType

        public B addType​(Class<?> 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)
      • qualifiers

        public B qualifiers​(org.jboss.jandex.AnnotationInstance... qualifiers)
      • name

        public B name​(String name)
      • named

        public B named​(String name)
        Unlike for the name(String) method a new Named qualifier 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
      • targetPackageName

        public B targetPackageName​(String name)
      • alternativePriority

        public B alternativePriority​(int value)
      • priority

        public B priority​(int value)
      • param

        public B param​(String name,
                       int value)
      • param

        public B param​(String name,
                       long value)
      • param

        public B param​(String name,
                       double value)
      • param

        public B param​(String name,
                       boolean value)
      • providerType

        public B providerType​(org.jboss.jandex.Type providerType)
        The provider type is the "real" type of the bean instance created via InjectableReferenceProvider.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 TB creator​(Class<? extends BeanCreator<U>> creatorClazz)
      • creator

        public <U extends TB creator​(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)
      • destroyer

        public <U extends TB destroyer​(Class<? extends BeanDestroyer<U>> destroyerClazz)
      • destroyer

        public <U extends TB destroyer​(Consumer<io.quarkus.gizmo.MethodCreator> methodCreatorConsumer)
      • cast

        protected static <T> T cast​(Object obj)