public void writeProperty(Object object, String propertyName, Object value) {
PropertyDescriptor property = getProperty(propertyName, object.getClass());
try {
property.getWriteMethod().invoke(object, value);
} catch (IllegalArgumentException e) {
throw new ObjectAccessException("Could not set property "
+ object.getClass() + '.' + property.getName(), e);
} catch (IllegalAccessException e) {
throw new ObjectAccessException("Could not set property "
+ object.getClass() + '.' + property.getName(), e);
} catch (InvocationTargetException e) {
throw new ObjectAccessException("Could not set property "
+ object.getClass() + '.' + property.getName(), e);
}
}