Top Description Fields Constructors Methods
tools.jackson.databind.introspect

public final Class AnnotationMap

extends Object
implements Annotations
Class Inheritance
All Implemented Interfaces
tools.jackson.databind.util.Annotations
Imports
java.lang.annotation.Annotation, java.util.*, java.util.stream.Stream, tools.jackson.databind.util.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?).

Field Summary

Modifier and TypeField and Description
protected final Map<Class<?>, Annotation>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public <A extends Annotation> A
get(Class<A> cls)

Implements tools.jackson.databind.util.Annotations.get.

Main access method used to find value for given annotation.

public boolean
public boolean
hasOneOf(Class<? extends Annotation>[] annoClasses)

Implements tools.jackson.databind.util.Annotations.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.

public static AnnotationMap
merge(AnnotationMap primary, AnnotationMap secondary)

public static AnnotationMap
of(Class<?> type, Annotation value)

public static AnnotationMap
of(Collection<Annotation> rawAnnotations)

public int
size()

Implements tools.jackson.databind.util.Annotations.size.

Returns number of annotation entries in this collection.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public Stream<Annotation>
values()

Implements tools.jackson.databind.util.Annotations.values.

Access method that returns a stream of all annotations contained.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_annotationsback to summary
protected final Map<Class<?>, Annotation> _annotations

Constructor Detail

AnnotationMapback to summary
public AnnotationMap()
AnnotationMapback to summary
public AnnotationMap(Map<Class<?>, Annotation> a)

Method Detail

getback to summary
public <A extends Annotation> A get(Class<A> cls)

Implements tools.jackson.databind.util.Annotations.get.

Doc from tools.jackson.databind.util.Annotations.get.

Main access method used to find value for given annotation.

Annotations
@SuppressWarnings:unchecked
@Override
hasback to summary
public boolean has(Class<? extends Annotation> cls)

Implements tools.jackson.databind.util.Annotations.has.

Annotations
@Override
hasOneOfback to summary
public boolean hasOneOf(Class<? extends Annotation>[] annoClasses)

Implements tools.jackson.databind.util.Annotations.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.

Annotations
@Override
mergeback to summary
public static AnnotationMap merge(AnnotationMap primary, AnnotationMap secondary)
ofback to summary
public static AnnotationMap of(Class<?> type, Annotation value)
ofback to summary
public static AnnotationMap of(Collection<Annotation> rawAnnotations)
sizeback to summary
public int size()

Implements tools.jackson.databind.util.Annotations.size.

Doc from tools.jackson.databind.util.Annotations.size.

Returns number of annotation entries in this collection.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
valuesback to summary
public Stream<Annotation> values()

Implements tools.jackson.databind.util.Annotations.values.

Doc from tools.jackson.databind.util.Annotations.values.

Access method that returns a stream of all annotations contained.

Annotations
@Override