touch(target, properties);
}
}
private static void touch(Object target, Object[] properties) {
BeanWrapper beanWrapper = new BeanWrapperImpl(target);
for (int x = 0; properties != null && x < properties.length; x++) {
Object property = properties[x];
if (property instanceof String) {
Object result = beanWrapper.getPropertyValue((String)property);
if (result instanceof Collection) {
((Collection)result).size();
}
} else if (property instanceof Map) {
for (Iterator iter = ((Map)property).keySet().iterator(); iter.hasNext();) {
Object key = iter.next();
Object tmpProperties = ((Map)property).get(key);
if (!(key instanceof String)) {
throw new IllegalArgumentException("Maps configured in the [properties] property should have a string key!");
}
if (!(tmpProperties instanceof Collection)) {
throw new IllegalArgumentException("Maps configured in the [properties] property should have a list value!");
}
Object result = beanWrapper.getPropertyValue((String)key);
if (result instanceof Collection) {
touch(((Collection)result).toArray(), ((Collection)tmpProperties).toArray());
} else if (result instanceof Object[]) {
touch((Object[])result, ((Collection)tmpProperties).toArray());
} else {