public class Annotations
extends java.lang.Object
implements java.io.Serializable, java.lang.Iterable<java.lang.annotation.Annotation>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.LinkedHashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> |
_annotations |
private java.lang.annotation.Annotation[] |
NO_ANNOTATIONS |
| Constructor and Description |
|---|
Annotations() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.annotation.Annotation override)
Method for adding specified annotation, overriding existing value
for the annotation type.
|
void |
addAll(Annotations overrides)
Method for adding all annotations from specified set, as overrides
to annotations this set has
|
void |
addAsDefault(java.lang.annotation.Annotation defValue)
Method for adding specified annotation if and only if no value
exists for the annotation type.
|
java.lang.annotation.Annotation[] |
asArray() |
java.util.List<java.lang.annotation.Annotation> |
asList() |
<A extends java.lang.annotation.Annotation> |
get(java.lang.Class<A> cls) |
java.util.Iterator<java.lang.annotation.Annotation> |
iterator() |
int |
size() |
java.lang.String |
toString() |
private final java.lang.annotation.Annotation[] NO_ANNOTATIONS
protected java.util.LinkedHashMap<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> _annotations
public void add(java.lang.annotation.Annotation override)
public void addAll(Annotations overrides)
public void addAsDefault(java.lang.annotation.Annotation defValue)
public java.util.Iterator<java.lang.annotation.Annotation> iterator()
iterator in interface java.lang.Iterable<java.lang.annotation.Annotation>public int size()
public <A extends java.lang.annotation.Annotation> A get(java.lang.Class<A> cls)
public java.lang.annotation.Annotation[] asArray()
public java.util.List<java.lang.annotation.Annotation> asList()
public java.lang.String toString()
toString in class java.lang.Object