Package com.fasterxml.jackson.jr.ob.impl
Class ClassKey
- java.lang.Object
-
- com.fasterxml.jackson.jr.ob.impl.ClassKey
-
public final class ClassKey extends Object
Key class, used as an efficient and accurate key for locating per-class values fromMaps.The reason for having a separate key class instead of directly using
Classas key is mostly to allow for redefininghashCodemethod -- for some strange reason,Classdoes not redefineObject.hashCode()and thus uses identity hash, which is pretty slow. This makes key access usingClassunnecessarily slow.Note: since class is not strictly immutable, caller must know what it is doing, if changing field values.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()StringtoString()ClassKeywith(Class<?> clz, int flags)
-
-
-
Constructor Detail
-
ClassKey
public ClassKey()
-
ClassKey
public ClassKey(Class<?> clz, int flags)
-
-