size = sizeOfPrimitive(o.getClass());
} else {
processedObjects.add(ow);
Class clazz = o.getClass();
while (clazz != null) {
Field fields[] = clazz.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field f = fields[i];
if ((f.getModifiers() & Modifier.STATIC) == 0) {
if (f.getType().isPrimitive()) {
size += sizeOfPrimitive(f.getType());
} else {
Object val = ACCESSOR.get(o, f);
if (f.getType().isArray()) {
size += sizeOfArray(val);
} else {
size += internalSizeOf(val);
size += SZ_REF;
}