Class GenericAnnotationAttributes<A extends java.lang.annotation.Annotation>

  • Type Parameters:
    A - The type of Annotation
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>
    Direct Known Subclasses:
    ResolvablePlaceholderAnnotationAttributes

    public class GenericAnnotationAttributes<A extends java.lang.annotation.Annotation>
    extends org.springframework.core.annotation.AnnotationAttributes
    Generic AnnotationAttributes
    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    AnnotationAttributes, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<A> annotationType()
      Get The class of Annotation.
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      static <A extends java.lang.annotation.Annotation>
      GenericAnnotationAttributes<A>
      of​(A annotation)
      Create an instance of GenericAnnotationAttributes from the specified annotation
      static <A extends java.lang.annotation.Annotation>
      GenericAnnotationAttributes<A>
      of​(org.springframework.core.annotation.AnnotationAttributes attributes)
      Create an instance of GenericAnnotationAttributes from the specified AnnotationAttributes
      static java.util.Set<org.springframework.core.annotation.AnnotationAttributes> ofSet​(org.springframework.core.annotation.AnnotationAttributes... attributesArray)
      • Methods inherited from class org.springframework.core.annotation.AnnotationAttributes

        fromMap, getAnnotation, getAnnotation, getAnnotationArray, getAnnotationArray, getBoolean, getClass, getClassArray, getEnum, getNumber, getString, getStringArray, toString
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • GenericAnnotationAttributes

        public GenericAnnotationAttributes​(A annotation)
      • GenericAnnotationAttributes

        public GenericAnnotationAttributes​(org.springframework.core.annotation.AnnotationAttributes another)
      • GenericAnnotationAttributes

        public GenericAnnotationAttributes​(java.util.Map<java.lang.String,​java.lang.Object> another,
                                           java.lang.Class<A> annotationType)
    • Method Detail

      • annotationType

        @Nullable
        public java.lang.Class<A> annotationType()
        Get The class of Annotation.

        Current method will override the super classes' method since Spring Framework 4.2

        Overrides:
        annotationType in class org.springframework.core.annotation.AnnotationAttributes
        Returns:
        null if not found
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        equals in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        hashCode in class java.util.AbstractMap<java.lang.String,​java.lang.Object>
      • of

        @NonNull
        public static <A extends java.lang.annotation.Annotation> GenericAnnotationAttributes<A> of​(@NonNull
                                                                                                    A annotation)
        Create an instance of GenericAnnotationAttributes from the specified annotation
        Type Parameters:
        A - the class of annotation
        Parameters:
        annotation - annotation
        Returns:
        non-null
      • of

        @NonNull
        public static <A extends java.lang.annotation.Annotation> GenericAnnotationAttributes<A> of​(@NonNull
                                                                                                    org.springframework.core.annotation.AnnotationAttributes attributes)
        Create an instance of GenericAnnotationAttributes from the specified AnnotationAttributes
        Type Parameters:
        A - the class of annotation
        Parameters:
        attributes - annotationAttributes
        Returns:
        non-null
      • ofSet

        @NonNull
        public static java.util.Set<org.springframework.core.annotation.AnnotationAttributes> ofSet​(@Nullable
                                                                                                    org.springframework.core.annotation.AnnotationAttributes... attributesArray)
        Parameters:
        attributesArray -
        Returns:
        non-null