Interface Qualifier<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PRIMARY
      The name of the primary annotation class.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default boolean contains​(Qualifier<T> qualifier)
      Whether this qualifier contains the given qualifier.
      default <BT extends BeanType<T>>
      java.util.Optional<BT>
      qualify​(java.lang.Class<T> beanType, java.util.stream.Stream<BT> candidates)
      Qualify the candidate from the stream of candidates.
      <BT extends BeanType<T>>
      java.util.stream.Stream<BT>
      reduce​(java.lang.Class<T> beanType, java.util.stream.Stream<BT> candidates)  
    • Field Detail

      • PRIMARY

        static final java.lang.String PRIMARY
        The name of the primary annotation class.
    • Method Detail

      • reduce

        <BT extends BeanType<T>> java.util.stream.Stream<BT> reduce​(java.lang.Class<T> beanType,
                                                                    java.util.stream.Stream<BT> candidates)
        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
      • contains

        default boolean contains​(Qualifier<T> qualifier)
        Whether this qualifier contains the given qualifier.
        Parameters:
        qualifier - The qualifier
        Returns:
        True it does
      • qualify

        default <BT extends BeanType<T>> java.util.Optional<BT> qualify​(java.lang.Class<T> beanType,
                                                                        java.util.stream.Stream<BT> candidates)
        Qualify the candidate from the stream of candidates.
        Type Parameters:
        BT - The bean type subclass
        Parameters:
        beanType - The bean type
        candidates - The candidates
        Returns:
        The qualified candidate or Optional.empty()