java.lang.Object
edu.internet2.middleware.grouperClientExt.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 Details

  • Constructor Details

    • AnnotationMap

      public AnnotationMap()
  • Method Details

    • of

      public static AnnotationMap of(Class<?> type, Annotation value)
    • 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
    • has

      public boolean has(Class<?> cls)
      Specified by:
      has in interface Annotations
    • hasOneOf

      public boolean hasOneOf(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.
      Specified by:
      hasOneOf in interface Annotations
      Since:
      2.7
    • annotations

      public Iterable<Annotation> annotations()
      Since:
      2.3
    • 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 boolean addIfNotPresent(Annotation ann)
      Method called to add specified annotation in the Map, but only if it didn't yet exist.
    • add

      public boolean add(Annotation ann)
      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

      public String toString()
      Overrides:
      toString in class Object
    • _add

      protected final boolean _add(Annotation ann)