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 TypeMethodDescriptionvoidadd(Annotation override) Method for adding specified annotation, overriding existing value for the annotation type.voidaddAll(Annotations overrides) Method for adding all annotations from specified set, as overrides to annotations this set hasvoidaddAsDefault(Annotation defValue) Method for adding specified annotation if and only if no value exists for the annotation type.asArray()asList()<A extends Annotation>
Aiterator()intsize()toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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:
iteratorin interfaceIterable<Annotation>
-
size
public int size() -
get
-
asArray
- Since:
- 1.1.1
-
asList
- Since:
- 1.1.1
-
toString
-