Class PrimaryQualifier<T>

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

@Internal public final class PrimaryQualifier<T> extends Object implements Qualifier<T>
A qualifier to lookup a primary bean.
Since:
3.5.0
Author:
Denis Stepanov
  • 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
    • toString

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

      public static <T1> PrimaryQualifier<T1> instance()
      Generified way to get the primary instance.
      Type Parameters:
      T1 - The generic type
      Returns:
      The instance
      Since:
      3.6.0