Class PrimaryQualifier<T>

  • Type Parameters:
    T - The generic type
    All Implemented Interfaces:
    Qualifier<T>

    @Internal
    public final class PrimaryQualifier<T>
    extends java.lang.Object
    implements Qualifier<T>
    A qualifier to lookup a primary bean.
    Since:
    3.5.0
    • Method Detail

      • reduce

        public <BT extends BeanType<T>> java.util.stream.Stream<BT> reduce​(java.lang.Class<T> beanType,
                                                                           java.util.stream.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 it cannot be qualified
      • toString

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

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