Class AnnotationBundleKey

java.lang.Object
com.fasterxml.jackson.jaxrs.cfg.AnnotationBundleKey

public final class AnnotationBundleKey extends Object
Helper class used to allow efficient caching of information, given a sequence of Annotations. This is mostly used for reusing introspected information on JAX-RS end points.
Since:
2.2
  • Field Details

    • NO_ANNOTATIONS

      private static final Annotation[] NO_ANNOTATIONS
    • _annotations

      private final Annotation[] _annotations
    • _type

      private final Class<?> _type
      We also seem to need the type as part of the key (as per [Issue#11]); hopefully that and annotations are enough (if not, may need to reconsider the way caching is done, and possibly only cache derivation of annotations, not mapper or reader/writer).
    • _annotationsCopied

      private final boolean _annotationsCopied
    • _hashCode

      private final int _hashCode
  • Constructor Details

    • AnnotationBundleKey

      public AnnotationBundleKey(Annotation[] annotations, Class<?> type)
    • AnnotationBundleKey

      private AnnotationBundleKey(Annotation[] annotations, Class<?> type, int hashCode)
  • Method Details

    • calcHash

      private static final int calcHash(Annotation[] annotations)
    • immutableKey

      public AnnotationBundleKey immutableKey()
      Method called to create a safe immutable copy of the key; used when adding entry with this key -- lookups are ok without calling the method.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • _equals

      private final boolean _equals(Annotation[] otherAnn)