com.fasterxml.jackson.databind.introspect

## Class AnnotationCollector

- java.lang.Object
- - com.fasterxml.jackson.databind.introspect.AnnotationCollector

    public abstract class AnnotationCollector
    extends Object

Helper class used to collect annotations to be stored as `Annotations` (like `AnnotationMap`).

Since:
  2.9

### Nested Class Summary

Nested Classes
`static class` `AnnotationCollector.NoAnnotations` Immutable implementation for case where no annotations are associated with an annotatable entity.
`static class` `AnnotationCollector.OneAnnotation`
`static class` `AnnotationCollector.TwoAnnotations`

### Field Summary

Fields
`protected Object` `_data` Optional data to carry along
`protected static Annotations` `NO_ANNOTATIONS`

### Constructor Summary

Constructors
`protected` `AnnotationCollector(Object d)`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`abstract AnnotationCollector` `addOrOverride(Annotation ann)`
`abstract AnnotationMap` `asAnnotationMap()`
`abstract Annotations` `asAnnotations()`
`static Annotations` `emptyAnnotations()`
`static AnnotationCollector` `emptyCollector()`
`static AnnotationCollector` `emptyCollector(Object data)`
`Object` `getData()`
`abstract boolean` `isPresent(Annotation ann)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### NO_ANNOTATIONS

    protected static final Annotations NO_ANNOTATIONS

#### _data

    protected final Object _data

Optional data to carry along

### Constructor Detail

#### AnnotationCollector

    protected AnnotationCollector(Object d)

### Method Detail

#### emptyAnnotations

    public static Annotations emptyAnnotations()

#### emptyCollector

    public static AnnotationCollector emptyCollector()

#### emptyCollector

    public static AnnotationCollector emptyCollector(Object data)

#### asAnnotations

    public abstract Annotations asAnnotations()

#### asAnnotationMap

    public abstract AnnotationMap asAnnotationMap()

#### getData

    public Object getData()

#### isPresent

    public abstract boolean isPresent(Annotation ann)

#### addOrOverride

    public abstract AnnotationCollector addOrOverride(Annotation ann)