} else if (value instanceof ObjectName[]) {
Map<String, Object> values = newHashMap();
for (ObjectName obj : (ObjectName[]) value) {
values.put(obj.getCanonicalName(), obj.getKeyPropertyListString());
}
Result r = getNewResultObject(attribute.getName(), values);
accumulator.add(r);
} else if (value.getClass().isArray()) {
// OMFG: this is nutty. some of the items in the array can be
// primitive! great interview question!
Map<String, Object> values = newHashMap();
for (int i = 0; i < Array.getLength(value); i++) {
Object val = Array.get(value, i);
values.put(attribute.getName() + "." + i, val);
}
accumulator.add(getNewResultObject(attribute.getName(), values));
} else if (value instanceof TabularDataSupport) {
TabularDataSupport tds = (TabularDataSupport) value;
Map<String, Object> values = Collections.emptyMap();
Result r = getNewResultObject(attribute.getName(), values);
processTabularDataSupport(accumulator, attribute.getName(), tds);
accumulator.add(r);
} else {
Map<String, Object> values = newHashMap();
values.put(attribute.getName(), value);
Result r = getNewResultObject(attribute.getName(), values);
accumulator.add(r);
}
}