if (visitor.shouldVisit(name, definedIn)) {
final Object value = readMethod.invoke(object);
visitor.visit(name, property.getPropertyType(), definedIn, value);
}
} catch (final IllegalArgumentException e) {
throw new ObjectAccessException("Could not get property "
+ object.getClass()
+ "."
+ property.getName(), e);
} catch (final IllegalAccessException e) {
throw new ObjectAccessException("Could not get property "
+ object.getClass()
+ "."
+ property.getName(), e);
} catch (final InvocationTargetException e) {
throw new ObjectAccessException("Could not get property "
+ object.getClass()
+ "."
+ property.getName(), e);
}
}