// Make sure that every class descriptor was created correctly.
// Set orderedClassDescriptors = new TreeSet(COMPARATOR);
MostSpecificClassMap map = new MostSpecificClassMap();
for (Iterator i = class2Descriptor.values().iterator(); i.hasNext();) {
TypeDescriptor descriptor = (TypeDescriptor) i.next();
if (descriptor instanceof BeanClassDescriptorImpl) {
BeanClassDescriptorImpl bean = (BeanClassDescriptorImpl) descriptor;
if (!bean.isComplete()) {
throw new IllegalStateException(
"Descriptor for class " + descriptor.getTypeClass()
.getName() + " has not been built");
}
}
map.put(descriptor.getTypeClass(), descriptor);
// // Add them to the list in order so that each class comes after
// // all classes that are derived from it. e.g. Object will come
// // last.
// orderedClassDescriptors.add(descriptor);
}