Class AnyQualifier<T>

java.lang.Object
io.micronaut.inject.qualifiers.AnyQualifier<T>
Type Parameters:
T - The generic type
All Implemented Interfaces:
Qualifier<T>

@Internal public final class AnyQualifier<T> extends Object implements Qualifier<T>
A qualifier to lookup any type.
Since:
3.0.0
  • Field Details

  • Method Details

    • reduce

      public <BT extends BeanType<T>> Stream<BT> reduce(Class<T> beanType, Stream<BT> candidates)
      Specified by:
      reduce in interface Qualifier<T>
      Type Parameters:
      BT - The bean type subclass
      Parameters:
      beanType - The bean type
      candidates - The candidates
      Returns:
      The qualified candidate or null it cannot be qualified
    • contains

      public boolean contains(Qualifier<T> qualifier)
      Description copied from interface: Qualifier
      Whether this qualifier contains the given qualifier.
      Specified by:
      contains in interface Qualifier<T>
      Parameters:
      qualifier - The qualifier
      Returns:
      True it does
    • qualify

      public <BT extends BeanType<T>> Optional<BT> qualify(Class<T> beanType, Stream<BT> candidates)
      Description copied from interface: Qualifier
      Qualify the candidate from the stream of candidates.
      Specified by:
      qualify in interface Qualifier<T>
      Type Parameters:
      BT - The bean type subclass
      Parameters:
      beanType - The bean type
      candidates - The candidates
      Returns:
      The qualified candidate or Optional.empty()
    • toString

      public String toString()
      Overrides:
      toString in class Object