Class TypeArgumentQualifier<T>

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

@Internal public final class TypeArgumentQualifier<T> extends FilteringQualifier<T>
A Qualifier that qualifies beans by generic type arguments.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • doesQualify

      public boolean doesQualify(Class<T> beanType, BeanType<T> candidate)
      Description copied from interface: Qualifier
      Check if the candidate qualifies.
      Parameters:
      beanType - The bean type
      candidate - The candidate
      Returns:
      true if matches
    • getTypeArguments

      public Class<?>[] getTypeArguments()
      Returns:
      The type arguments
    • areTypesCompatible

      public static boolean areTypesCompatible(Class<?>[] typeArguments, List<Class<?>> classes)
      Are the given types compatible.
      Parameters:
      typeArguments - The type arguments
      classes - The classes to check for alignments
      Returns:
      True if they are
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object