Package com.fasterxml.classmate
Class Annotations
java.lang.Object
com.fasterxml.classmate.Annotations
- All Implemented Interfaces:
Serializable
,Iterable<Annotation>
Container class used for storing set of annotations resolved for types (classes)
as members (methods, fields, constructors).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinkedHashMap
<Class<? extends Annotation>, Annotation> private final Annotation[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(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 hasvoid
addAsDefault
(Annotation defValue) Method for adding specified annotation if and only if no value exists for the annotation type.asArray()
asList()
<A extends Annotation>
Aiterator()
int
size()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
NO_ANNOTATIONS
-
_annotations
-
-
Constructor Details
-
Annotations
public Annotations()
-
-
Method Details
-
add
Method for adding specified annotation, overriding existing value for the annotation type. -
addAll
Method for adding all annotations from specified set, as overrides to annotations this set has -
addAsDefault
Method for adding specified annotation if and only if no value exists for the annotation type. -
iterator
- Specified by:
iterator
in interfaceIterable<Annotation>
-
size
public int size() -
get
-
asArray
- Since:
- 1.1.1
-
asList
- Since:
- 1.1.1
-
toString
-