Package io.quarkus.arc.processor
Interface BeanResolver
public interface BeanResolver
Implements type-safe resolution rules.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasQualifier(Collection<org.jboss.jandex.AnnotationInstance> qualifiers, org.jboss.jandex.AnnotationInstance requiredQualifier) booleanmatches(BeanInfo bean, InjectionPointInfo.TypeAndQualifiers typeAndQualifiers) Checks if givenBeanInfohas type and qualifiers matching those in providedInjectionPointInfo.TypeAndQualifiers.booleanmatches(BeanInfo bean, org.jboss.jandex.Type requiredType, Set<org.jboss.jandex.AnnotationInstance> requiredQualifiers) Checks if givenBeanInfohas type and qualifiers matching those in providedInjectionPointInfo.TypeAndQualifiers.booleanmatches(org.jboss.jandex.Type requiredType, org.jboss.jandex.Type beanType) Returns true if required and candidate bean type match, false otherwise.booleanmatchesType(BeanInfo bean, org.jboss.jandex.Type requiredType) Returns true if provided bean matches required type, false otherwisebooleanmatchTypeArguments(org.jboss.jandex.Type requiredTypeArgument, org.jboss.jandex.Type typeArgument) resolveAmbiguity(Set<BeanInfo> beans) Apply the ambiguous dependency resolution rules.resolveBeans(org.jboss.jandex.Type requiredType, Set<org.jboss.jandex.AnnotationInstance> requiredQualifiers) Note that this method does not attempt to resolve the ambiguity.resolveBeans(org.jboss.jandex.Type requiredType, org.jboss.jandex.AnnotationInstance... requiredQualifiers)
-
Method Details
-
resolveBeans
-
resolveBeans
Set<BeanInfo> resolveBeans(org.jboss.jandex.Type requiredType, Set<org.jboss.jandex.AnnotationInstance> requiredQualifiers) Note that this method does not attempt to resolve the ambiguity.- Parameters:
requiredType-requiredQualifiers-- Returns:
- the set of beans which have the given required type and qualifiers
- See Also:
-
resolveAmbiguity
Apply the ambiguous dependency resolution rules.- Parameters:
beans-- Returns:
- the resolved bean, or null
- Throws:
jakarta.enterprise.inject.AmbiguousResolutionException
-
matches
Checks if givenBeanInfohas type and qualifiers matching those in providedInjectionPointInfo.TypeAndQualifiers.- Parameters:
bean- Candidate beantypeAndQualifiers- Required type and qualifiers- Returns:
- True if provided
BeanInfomatches given required type and qualifiers, false otherwise
-
matches
boolean matches(BeanInfo bean, org.jboss.jandex.Type requiredType, Set<org.jboss.jandex.AnnotationInstance> requiredQualifiers) Checks if givenBeanInfohas type and qualifiers matching those in providedInjectionPointInfo.TypeAndQualifiers.- Parameters:
bean- Candidate beanrequiredType- Required bean typerequiredQualifiers- Required qualifiers- Returns:
- True if provided
BeanInfomatches given required type and qualifiers, false otherwise
-
matches
boolean matches(org.jboss.jandex.Type requiredType, org.jboss.jandex.Type beanType) Returns true if required and candidate bean type match, false otherwise.- Parameters:
requiredType- Required bean typebeanType- Candidate bean type- Returns:
- True if required type and bean type match, false otherwise
-
matchesType
Returns true if provided bean matches required type, false otherwise- Parameters:
bean- Candidate beanrequiredType- Required bean type- Returns:
- Returns true if given bean matches required type, false otherwise
-
hasQualifier
boolean hasQualifier(Collection<org.jboss.jandex.AnnotationInstance> qualifiers, org.jboss.jandex.AnnotationInstance requiredQualifier) - Parameters:
qualifiers-requiredQualifier-- Returns:
trueif any qualifier from the collection matches the required qualifiers,falseotherwise
-
matchTypeArguments
boolean matchTypeArguments(org.jboss.jandex.Type requiredTypeArgument, org.jboss.jandex.Type typeArgument) - Parameters:
requiredTypeArgument-typeArgument-- Returns:
trueif the required type argument matches the given type argument,falseotherwise
-