return initializeMap(type);
}
private static final Object CRITICAL_SECTION = new Object();
private static ClassValueMap initializeMap(Class<?> type) {
ClassValueMap map;
synchronized (CRITICAL_SECTION) { // private object to avoid deadlocks
// happens about once per type
if ((map = type.classValueMap) == null)
type.classValueMap = map = new ClassValueMap(type);
}
return map;
}