Class clazz = (Class) ref.get();
if (clazz == null)
return null;
ReferenceTypeId id;
if (clazz.isArray())
id = new ArrayReferenceTypeId();
else if (clazz.isInterface())
id = new InterfaceReferenceTypeId();
else id = new ClassReferenceTypeId();
id.setReference(ref);
synchronized (ridLock)