}
private ReferenceMapping getReferenceMapping(ClassRef cr, Class clazz)
throws SpeedoException {
String rid = cr.getName();
ReferenceMapping rm = getMapping(clazz).getClassMapping()
.getReferenceMapping(rid);
if (rm == null) {
Class klass = clazz;
Collection superclasses = klass.getSuperClasses();
while (rm == null && !superclasses.isEmpty()) {