for (Box b : container.getBoxes()) {
List<Box> myBoxes = (List<Box>) container.getBoxes(b.getClass());
boolean found = false;
for (Box myBox : myBoxes) {
if (myBox == b) {
found = true;
}
}
if (!found) {
throw new RuntimeException("Didn't find the box");
}
if (b instanceof ContainerBox) {
Walk.through((ContainerBox) b);
}
b.toString(); // Just test if some execption is trown
BeanInfo beanInfo = Introspector.getBeanInfo(b.getClass());
PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
String name = propertyDescriptor.getName();
if (!Walk.skipList.contains(name) &&
propertyDescriptor.getReadMethod() != null &&
!Box.class.isAssignableFrom(propertyDescriptor.getReadMethod().getReturnType())) {
propertyDescriptor.getReadMethod().invoke(b, (Object[]) null);
}
}
if (b instanceof AbstractBox) {
assert ((AbstractBox) b).isParsed();
}
}