Package com.fasterxml.jackson.jaxrs.cfg
Class AnnotationBundleKey
java.lang.Object
com.fasterxml.jackson.jaxrs.cfg.AnnotationBundleKey
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final Annotation[]
private final boolean
private final int
private final Class
<?> 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).private static final Annotation[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionAnnotationBundleKey
(Annotation[] annotations, Class<?> type) private
AnnotationBundleKey
(Annotation[] annotations, Class<?> type, int hashCode) -
Method Summary
Modifier and TypeMethodDescriptionprivate final boolean
_equals
(Annotation[] otherAnn) private static final int
calcHash
(Annotation[] annotations) boolean
int
hashCode()
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.toString()
-
Field Details
-
NO_ANNOTATIONS
-
_annotations
-
_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
-
AnnotationBundleKey
-
-
Method Details
-
calcHash
-
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() -
toString
-
equals
-
_equals
-