public final class AnnotationMap extends java.lang.Object implements Annotations
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> |
_annotations |
Constructor and Description |
---|
AnnotationMap() |
Modifier and Type | Method and Description |
---|---|
protected void |
_add(java.lang.annotation.Annotation ann) |
void |
add(java.lang.annotation.Annotation ann)
Method called to add specified annotation in the Map.
|
void |
addIfNotPresent(java.lang.annotation.Annotation ann)
Method called to add specified annotation in the Map, but
only if it didn't yet exist.
|
<A extends java.lang.annotation.Annotation> |
get(java.lang.Class<A> cls)
Main access method used to find value for given annotation.
|
static AnnotationMap |
merge(AnnotationMap primary,
AnnotationMap secondary) |
int |
size()
Returns number of annotation entries in this collection.
|
java.lang.String |
toString() |
protected java.util.HashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> _annotations
public <A extends java.lang.annotation.Annotation> A get(java.lang.Class<A> cls)
Annotations
get
in interface Annotations
public static AnnotationMap merge(AnnotationMap primary, AnnotationMap secondary)
public int size()
Annotations
size
in interface Annotations
public void addIfNotPresent(java.lang.annotation.Annotation ann)
public void add(java.lang.annotation.Annotation ann)
public java.lang.String toString()
toString
in class java.lang.Object
protected final void _add(java.lang.annotation.Annotation ann)