Package io.micronaut.inject.qualifiers
Class AnyQualifier<T>
java.lang.Object
io.micronaut.inject.qualifiers.FilteringQualifier<T>
io.micronaut.inject.qualifiers.AnyQualifier<T>
- Type Parameters:
T
- The generic type
- All Implemented Interfaces:
Qualifier<T>
A qualifier to look up any type.
- Since:
- 3.0.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether this qualifier contains the given qualifier.boolean
doesQualify
(Class<T> beanType, BeanType<T> candidate) Check if the candidate qualifies.boolean
doesQualify
(Class<T> beanType, Collection<? extends BeanType<T>> candidates) Check if at least one candidate qualifies.<BT extends BeanType<T>>
Collection<BT>filter
(Class<T> beanType, Collection<BT> candidates) Filter the candidates.Qualify the candidate from the stream of candidates.toString()
-
Field Details
-
INSTANCE
-
-
Method Details
-
doesQualify
Description copied from interface:Qualifier
Check if the candidate qualifies.- Parameters:
beanType
- The bean typecandidate
- The candidate- Returns:
- true if matches
-
reduce
-
contains
Description copied from interface:Qualifier
Whether this qualifier contains the given qualifier.- Parameters:
qualifier
- The qualifier- Returns:
- True it does
-
qualify
Description copied from interface:Qualifier
Qualify the candidate from the stream of candidates.- Type Parameters:
BT
- The bean type subclass- Parameters:
beanType
- The bean typecandidates
- The candidates- Returns:
- The qualified candidate or
Optional.empty()
-
doesQualify
Description copied from interface:Qualifier
Check if at least one candidate qualifies.- Specified by:
doesQualify
in interfaceQualifier<T>
- Overrides:
doesQualify
in classFilteringQualifier<T>
- Parameters:
beanType
- The bean typecandidates
- The candidates- Returns:
- true if qualifies
-
filter
Description copied from interface:Qualifier
Filter the candidates. -
toString
-