public final class ClassKey extends java.lang.Object implements java.lang.Comparable<ClassKey>, java.io.Serializable
JsonSerializers.
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(java.lang.Class<?> clz) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ClassKey other) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
void |
reset(java.lang.Class<?> clz) |
java.lang.String |
toString() |
public void reset(java.lang.Class<?> clz)
public int compareTo(ClassKey other)
compareTo in interface java.lang.Comparable<ClassKey>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"