public final class ClassKey extends Object
Maps.
The reason for having a separate key class instead of
directly using Class as key is mostly
to allow for redefining hashCode method --
for some strange reason, Class does not
redefine Object.hashCode() and thus uses identity
hash, which is pretty slow. This makes key access using
Class unnecessarily slow.
Note: since class is not strictly immutable, caller must know what it is doing, if changing field values.
| Constructor and Description |
|---|
ClassKey() |
ClassKey(Class<?> clz,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
ClassKey |
with(Class<?> clz,
int flags) |
public ClassKey()
public ClassKey(Class<?> clz, int flags)
Copyright © 2025 FasterXML. All rights reserved.