Class GenericAnnotationAttributes<A extends java.lang.annotation.Annotation>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,java.lang.Object>
-
- org.springframework.core.annotation.AnnotationAttributes
-
- io.microsphere.spring.core.annotation.GenericAnnotationAttributes<A>
-
- Type Parameters:
A
- The type ofAnnotation
- 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
GenericAnnotationAttributes
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
AnnotationAttributes
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GenericAnnotationAttributes(A annotation)
GenericAnnotationAttributes(java.util.Map<java.lang.String,java.lang.Object> another, java.lang.Class<A> annotationType)
GenericAnnotationAttributes(org.springframework.core.annotation.AnnotationAttributes another)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<A>
annotationType()
Get Theclass
ofAnnotation
.boolean
equals(java.lang.Object o)
int
hashCode()
static <A extends java.lang.annotation.Annotation>
GenericAnnotationAttributes<A>of(A annotation)
Create an instance ofGenericAnnotationAttributes
from the specifiedannotation
static <A extends java.lang.annotation.Annotation>
GenericAnnotationAttributes<A>of(org.springframework.core.annotation.AnnotationAttributes attributes)
Create an instance ofGenericAnnotationAttributes
from the specifiedAnnotationAttributes
static java.util.Set<org.springframework.core.annotation.AnnotationAttributes>
ofSet(org.springframework.core.annotation.AnnotationAttributes... attributesArray)
Create aset
ofGenericAnnotationAttributes
-
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
-
-
-
-
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 Theclass
ofAnnotation
.Current method will override the super classes' method since Spring Framework 4.2
- Overrides:
annotationType
in classorg.springframework.core.annotation.AnnotationAttributes
- Returns:
null
if not found
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
equals
in classjava.util.AbstractMap<java.lang.String,java.lang.Object>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Map<java.lang.String,java.lang.Object>
- Overrides:
hashCode
in classjava.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 ofGenericAnnotationAttributes
from the specifiedannotation
- Type Parameters:
A
- theclass
ofannotation
- 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 ofGenericAnnotationAttributes
from the specifiedAnnotationAttributes
- Type Parameters:
A
- theclass
ofannotation
- 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)
Create aset
ofGenericAnnotationAttributes
- Parameters:
attributesArray
-- Returns:
- non-null
-
-