Class AnnotationMap
java.lang.Object
com.fasterxml.jackson.databind.introspect.AnnotationMap
- All Implemented Interfaces:
Annotations
Simple helper class used to keep track of collection of
Jackson Annotations associated with annotatable things
(methods, constructors, classes).
Note that only Jackson-owned annotations are tracked (for now?).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(Annotation ann) Method called to add specified annotation in the Map.booleanMethod called to add specified annotation in the Map, but only if it didn't yet exist.<A extends Annotation>
AMain access method used to find value for given annotation.booleanbooleanhasOneOf(Class<? extends 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 AnnotationMapmerge(AnnotationMap primary, AnnotationMap secondary) static AnnotationMapof(Class<?> type, Annotation value) intsize()Returns number of annotation entries in this collection.toString()
-
Constructor Details
-
AnnotationMap
public AnnotationMap()
-
-
Method Details
-
of
-
get
Description copied from interface:AnnotationsMain access method used to find value for given annotation.- Specified by:
getin interfaceAnnotations
-
has
- Specified by:
hasin interfaceAnnotations
-
hasOneOf
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.- Specified by:
hasOneOfin interfaceAnnotations- Since:
- 2.7
-
annotations
- Since:
- 2.3
-
merge
-
size
public int size()Description copied from interface:AnnotationsReturns number of annotation entries in this collection.- Specified by:
sizein interfaceAnnotations
-
addIfNotPresent
Method called to add specified annotation in the Map, but only if it didn't yet exist. -
add
Method called to add specified annotation in the Map.- Returns:
- True if the addition changed the contents, that is, this map did not already have specified annotation
-
toString
-