Class ClassKey
- java.lang.Object
-
- com.fasterxml.jackson.jakarta.rs.base.util.ClassKey
-
- All Implemented Interfaces:
Comparable<ClassKey>
public final class ClassKey extends Object implements Comparable<ClassKey>
Efficient key class, used instead of usingClass
. The reason for having a separate key class instead of directly usingClass
as key is mostly to allow for redefininghashCode
method -- for some strange reason,Class
does not redefineObject.hashCode()
and thus uses identity hash, which is pretty slow. This makes key access usingClass
unnecessarily slow.Note: since class is not strictly immutable, caller must know what it is doing, if changing field values.
- Since:
- 2.2