try {
Integer index = token == null ? null : Integer.valueOf(token);
access = new IndexedAccess(type, index);
validationContext.setCurrentIndex(index);
} catch (NumberFormatException e) {
throw new UnknownPropertyException(String.format("Cannot parse %s as an array/iterable index", token),
e);
}
} else if (KeyedAccess.getJavaElementType(type) != null) {
access = new KeyedAccess(type, token);
validationContext.setCurrentKey(token);
} else {
throw new UnknownPropertyException(String.format("Cannot determine index/key type for %s", type));
}
Object value = validationContext.getBean();
Object child = value == null ? null : access.get(value);
setType(child == null ? access.getJavaType() : child.getClass());
validationContext.setBean(child,