public final class AnnotationMap extends java.lang.Object implements Annotations
| Constructor and Description |
|---|
AnnotationMap() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.annotation.Annotation ann)
Method called to add specified annotation in the Map.
|
boolean |
addIfNotPresent(java.lang.annotation.Annotation ann)
Method called to add specified annotation in the Map, but
only if it didn't yet exist.
|
java.lang.Iterable<java.lang.annotation.Annotation> |
annotations() |
<A extends java.lang.annotation.Annotation> |
get(java.lang.Class<A> cls)
Main access method used to find value for given annotation.
|
boolean |
has(java.lang.Class<?> cls) |
boolean |
hasOneOf(java.lang.Class<? extends java.lang.annotation.Annotation>[] annoClasses)
Helper method that can be used for a "bulk" check to see if at least
one of given annotation types is included within this map.
|
static AnnotationMap |
merge(AnnotationMap primary,
AnnotationMap secondary) |
static AnnotationMap |
of(java.lang.Class<?> type,
java.lang.annotation.Annotation value) |
int |
size()
Returns number of annotation entries in this collection.
|
java.lang.String |
toString() |
public static AnnotationMap of(java.lang.Class<?> type, java.lang.annotation.Annotation value)
public <A extends java.lang.annotation.Annotation> A get(java.lang.Class<A> cls)
Annotationsget in interface Annotationspublic boolean has(java.lang.Class<?> cls)
has in interface Annotationspublic boolean hasOneOf(java.lang.Class<? extends java.lang.annotation.Annotation>[] annoClasses)
hasOneOf in interface Annotationspublic java.lang.Iterable<java.lang.annotation.Annotation> annotations()
public static AnnotationMap merge(AnnotationMap primary, AnnotationMap secondary)
public int size()
Annotationssize in interface Annotationspublic boolean addIfNotPresent(java.lang.annotation.Annotation ann)
public boolean add(java.lang.annotation.Annotation ann)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved