LinkedList<CachedClass> superClasses = new LinkedList<CachedClass>();
superClasses.add(ReflectionCache.OBJECT_CLASS);
Set interfaces = theCachedClass.getInterfaces();
classPropertyIndexForSuper = classPropertyIndex;
final SingleKeyHashMap cPI = classPropertyIndex.getNotNull(theCachedClass);
for (Iterator interfaceIter = interfaces.iterator(); interfaceIter.hasNext();) {
CachedClass iclass = (CachedClass) interfaceIter.next();
SingleKeyHashMap iPropertyIndex = cPI;
addFields(iclass, iPropertyIndex);
classPropertyIndex.put(iclass, iPropertyIndex);
}
classPropertyIndex.put(ReflectionCache.OBJECT_CLASS, cPI);
applyPropertyDescriptors(propertyDescriptors);
applyStrayPropertyMethods(superClasses, classPropertyIndex, true);
makeStaticPropertyIndex();
} else {
LinkedList<CachedClass> superClasses = getSuperClasses();
Set interfaces = theCachedClass.getInterfaces();
// if this an Array, then add the special read-only "length" property
if (theCachedClass.isArray) {
SingleKeyHashMap map = new SingleKeyHashMap();
map.put("length", arrayLengthProperty);
classPropertyIndex.put(theCachedClass, map);
}
inheritStaticInterfaceFields(superClasses, interfaces);
inheritFields(superClasses);