Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fasterxml.jackson.databind.introspect
Class AnnotationMap

    java.lang.Object
      com.fasterxml.jackson.databind.introspect.AnnotationMap

All Implemented Interfaces:
  Annotations

    public final class AnnotationMap

extends Object
implements 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
`protected HashMap<Class<? extends Annotation>,Annotation>` | `_annotations`

Constructor Summary
`AnnotationMap()`

Method Summary
`protected void` | `_add(Annotation ann)`
`void` | `add(Annotation ann)` Method called to add specified annotation in the Map.
`void` | `addIfNotPresent(Annotation ann)` Method called to add specified annotation in the Map, but only if it didn't yet exist.
`
`<A extends Annotation> A`
` | `get(Class<A> cls)` Main access method used to find value for given annotation.
`static AnnotationMap` | `merge(AnnotationMap primary, AnnotationMap secondary)`
`int` | `size()` Returns number of annotation entries in this collection.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### _annotations

    protected HashMap<Class<? extends Annotation>,Annotation> _annotations

Constructor Detail

### AnnotationMap

    public AnnotationMap()

Method Detail

### get

    public <A extends Annotation> A get(Class<A> cls)

  Description copied from interface: `Annotations`
  Main access method used to find value for given annotation.

  Specified by:
    `get` in interface `Annotations`

### merge

    public static AnnotationMap merge(AnnotationMap primary,
                                      AnnotationMap secondary)

### size

    public int size()

  Description copied from interface: `Annotations`
  Returns number of annotation entries in this collection.

  Specified by:
    `size` in interface `Annotations`

### addIfNotPresent

    public void addIfNotPresent(Annotation ann)

  Method called to add specified annotation in the Map, but only if it didn't yet exist.

### add

    public void add(Annotation ann)

  Method called to add specified annotation in the Map.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### _add

    protected final void _add(Annotation ann)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 fasterxml.com. All Rights Reserved.