Getter result = null;
for (int i = 0; i < chain.length; i++) {
PropertyAccessor candidate = chain[i];
try {
result = candidate.getGetter(theClass, propertyName);
return result;
} catch (PropertyNotFoundException pnfe) {
// ignore
}
}
throw new PropertyNotFoundException("Could not find getter for " + propertyName + " on " + theClass);