List of usage examples for org.springframework.util ReflectionUtils invokeMethod
@Nullable public static Object invokeMethod(Method method, @Nullable Object target)
From source file:org.squashtest.tm.domain.event.RequirementModificationEventPublisherAspect.java
private Object readOldValue(RequirementVersion req, String propertyName) { try {/*from ww w. j a va 2 s. c o m*/ Method propertyGetter = RequirementVersion.class.getMethod("get" + WordUtils.capitalize(propertyName)); return ReflectionUtils.invokeMethod(propertyGetter, req); } catch (NoSuchMethodException e) { ReflectionUtils.handleReflectionException(e); } // this should never happen - the catch block rethows an exception return null; }