Class Key


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

      Constructors 
      Constructor Description
      Key​(java.lang.reflect.Type type)
      Constructs a new instance.
      Key​(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

      • Key

        public Key​(java.lang.reflect.Type type,
                   java.util.Collection<java.lang.annotation.Annotation> qualifiers)
        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
      • Key

        public Key​(java.lang.reflect.Type type)
        Constructs a new instance.
        Parameters:
        type - a Type, cannot be null
    • Method Detail

      • getType

        public java.lang.reflect.Type getType()
        Returns the Type.
        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