public final class AnnotationMap extends Object implements Annotations
限定符和类型 | 字段和说明 |
---|---|
protected HashMap<Class<? extends Annotation>,Annotation> |
_annotations |
构造器和说明 |
---|
AnnotationMap() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
_add(Annotation ann) |
void |
add(Annotation ann)
Method called to add specified annotation in the Map.
|
void |
addIfNotPresent(Annotation ann)
Method called to add specified annotation in the Map, but
only if it didn't yet exist.
|
<A extends Annotation> |
get(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.
|
String |
toString() |
protected HashMap<Class<? extends Annotation>,Annotation> _annotations
public <A extends Annotation> A get(Class<A> cls)
Annotations
get
在接口中 Annotations
public static AnnotationMap merge(AnnotationMap primary, AnnotationMap secondary)
public int size()
Annotations
size
在接口中 Annotations
public void addIfNotPresent(Annotation ann)
public void add(Annotation ann)
protected final void _add(Annotation ann)