if (cls == null) {
out.append("null");
} else {
String simpleName = cls.getClass().getSimpleName();
if (simpleName == null || simpleName.length() <= 0) {
simpleName = cls.getClass().getName();
int end = simpleName.lastIndexOf('.");
if (end > 0) {
simpleName = simpleName.substring(end+1);
}
}
out.append(simpleName);
out.append('{");
out.append(Integer.toHexString(System.identityHashCode(cls)));
}