}
}
public Object getIndexedPropertyValue(String propertyName) throws BeansException {
if (getPropertyType(propertyName) == null) {
throw new NotReadablePropertyException(getTargetClass(), propertyName,
"property type could not be determined");
}
String rootPropertyName = getRootPropertyName(propertyName);
Member readAccessor = getReadPropertyAccessor(rootPropertyName);
if (readAccessor == null) {
throw new NotReadablePropertyException(getTargetClass(), propertyName,
"Neither non-static field nor get-method exists for indexed property");
}
Object rootProperty = getPropertyValue(rootPropertyName);
if (rootProperty == null) {
if (isStrictNullHandlingEnabled()) {
throw new NullValueInNestedPathException(getTargetClass(), propertyName);
}
else if (isWritableProperty(rootPropertyName)) {
return null;
}
else {
throw new NotReadablePropertyException(getTargetClass(), propertyName);
}
}
Object[] indices;
try {
indices = getIndices(propertyName);