Class BeanInfo

java.lang.Object
io.quarkus.arc.processor.BeanInfo
All Implemented Interfaces:
InjectionTargetInfo
Direct Known Subclasses:
DecoratorInfo, InterceptorInfo

public class BeanInfo extends Object implements InjectionTargetInfo
Represents a CDI bean at build time.
  • Field Details

    • target

      protected final Optional<org.jboss.jandex.AnnotationTarget> target
    • scope

      protected final ScopeInfo scope
    • types

      protected final Set<org.jboss.jandex.Type> types
    • unrestrictedTypes

      protected final Set<org.jboss.jandex.Type> unrestrictedTypes
    • qualifiers

      protected final Set<org.jboss.jandex.AnnotationInstance> qualifiers
  • Method Details

    • kind

      Specified by:
      kind in interface InjectionTargetInfo
    • asBean

      public BeanInfo asBean()
      Specified by:
      asBean in interface InjectionTargetInfo
    • getIdentifier

      public String getIdentifier()
    • getTarget

      public Optional<org.jboss.jandex.AnnotationTarget> getTarget()
      Returns:
      the annotation target or an empty optional in case of synthetic beans
    • getImplClazz

      public org.jboss.jandex.ClassInfo getImplClazz()
      Returns:
      the impl class or null in case of a producer of a primitive type or an array
    • isClassBean

      public boolean isClassBean()
    • isProducerMethod

      public boolean isProducerMethod()
    • isProducerField

      public boolean isProducerField()
    • isProducer

      public boolean isProducer()
    • isStaticProducer

      public boolean isStaticProducer()
    • isSynthetic

      public boolean isSynthetic()
    • isRemovable

      public boolean isRemovable()
    • getBeanClass

      public org.jboss.jandex.DotName getBeanClass()
    • isInterceptor

      public boolean isInterceptor()
    • isDecorator

      public boolean isDecorator()
    • getDeclaringBean

      public BeanInfo getDeclaringBean()
    • getProviderType

      public org.jboss.jandex.Type getProviderType()
    • getScope

      public ScopeInfo getScope()
    • getTypes

      public Set<org.jboss.jandex.Type> getTypes()
    • getUnrestrictedTypes

      public Set<org.jboss.jandex.Type> getUnrestrictedTypes()
      Returns:
      the unrestricted set of bean types
      See Also:
      • Typed
    • hasType

      public boolean hasType(org.jboss.jandex.DotName typeName)
    • getQualifiers

      public Set<org.jboss.jandex.AnnotationInstance> getQualifiers()
    • getQualifier

      public Optional<org.jboss.jandex.AnnotationInstance> getQualifier(org.jboss.jandex.DotName dotName)
    • hasDefaultQualifiers

      public boolean hasDefaultQualifiers()
    • hasInjectionPoint

      public boolean hasInjectionPoint()
    • getAllInjectionPoints

      public List<InjectionPointInfo> getAllInjectionPoints()
    • hasAroundInvokeInterceptorWithBinding

      public boolean hasAroundInvokeInterceptorWithBinding(org.jboss.jandex.DotName binding)
      Returns:
      true if the bean has an associated interceptor with the given binding, false otherwise
    • getInterceptedMethodsBindings

      public Map<org.jboss.jandex.MethodInfo,Set<org.jboss.jandex.AnnotationInstance>> getInterceptedMethodsBindings()
      Returns:
      an immutable map of intercepted methods to the set of interceptor bindings
    • hasLifecycleInterceptors

      public boolean hasLifecycleInterceptors()
    • hasAroundInvokeInterceptors

      public boolean hasAroundInvokeInterceptors()
    • hasDestroyLogic

      public boolean hasDestroyLogic()
      Returns:
      true if the bean requires some customized destroy logic
    • isForceApplicationClass

      public boolean isForceApplicationClass()
    • getBoundInterceptors

      public List<InterceptorInfo> getBoundInterceptors()
      Note that the interceptors are not available until the bean is fully initialized, i.e. they are available after BeanProcessor.initialize(Consumer, List).
      Returns:
      an ordered list of all interceptors associated with the bean
    • getBoundDecorators

      public List<DecoratorInfo> getBoundDecorators()
      Note that the decorators are not available until the bean is fully initialized, i.e. they are available after BeanProcessor.initialize(Consumer, List).
      Returns:
      an ordered list of all decorators associated with the bean
    • getDisposer

      public DisposerInfo getDisposer()
    • isAlternative

      public boolean isAlternative()
    • getPriority

      public Integer getPriority()
    • getStereotypes

      public List<StereotypeInfo> getStereotypes()
    • getName

      public String getName()
    • isDefaultBean

      public boolean isDefaultBean()
    • getStartupPriority

      public OptionalInt getStartupPriority()
    • isAssignableTo

      public boolean isAssignableTo(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers)
      Parameters:
      requiredType -
      requiredQualifiers -
      Returns:
      true if this bean is assignable to the required type and qualifiers
    • canBeInactive

      public boolean canBeInactive()
      Returns whether this bean can be inactive. Most beans are always active, but certain synthetic beans may be inactive from time to time.
      Returns:
      whether this bean can be inactive
      See Also:
      • getCheckActiveConsumer()
    • getTargetPackageName

      public String getTargetPackageName()
    • getClientProxyPackageName

      public String getClientProxyPackageName()
    • getType

      protected String getType()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object