Class QualifiedType


  • public final class QualifiedType
    extends java.lang.Object
    Represents a fully resolved Type with a set of qualifier Annotations.
    • Constructor Summary

      Constructors 
      Constructor Description
      QualifiedType​(java.lang.reflect.Type type)
      Constructs a new instance.
      QualifiedType​(java.lang.reflect.Type type, java.util.Collection<java.lang.annotation.Annotation> qualifiers)
      Constructs a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.util.Set<java.lang.annotation.Annotation> getQualifiers()
      Returns an immutable set of qualifier Annotations.
      java.lang.reflect.Type getType()
      Returns the Type.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • QualifiedType

        public QualifiedType​(java.lang.reflect.Type type,
                             java.util.Collection<java.lang.annotation.Annotation> qualifiers)
                      throws BadQualifiedTypeException
        Constructs a new instance.
        Parameters:
        type - a Type, cannot be null
        qualifiers - a collection of qualifier Annotations, cannot be null or contain nulls but can be empty
        Throws:
        BadQualifiedTypeException - when the given type or qualifiers are not suitable for injection
      • QualifiedType

        public QualifiedType​(java.lang.reflect.Type type)
                      throws BadQualifiedTypeException
        Constructs a new instance.
        Parameters:
        type - a Type, cannot be null
        Throws:
        BadQualifiedTypeException - when the given type or qualifiers are not suitable for injection
    • Method Detail

      • getType

        public java.lang.reflect.Type getType()
        Returns the Type. The type is always fully resolved (no type variables) and never void.
        Returns:
        the Type, never null
      • getQualifiers

        public java.util.Set<java.lang.annotation.Annotation> getQualifiers()
        Returns an immutable set of qualifier Annotations.
        Returns:
        an immutable set of qualifier Annotations, never null and never contains nulls but can be empty
      • toString

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object