in src/main/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractor.java [297:327]
private static Object getPropertyValue(Object value, String property) throws IntrospectionException {
if (value == null || property == null) {
return null;
}
ClassMap classMap = getClassMap(value.getClass());
String methodBase = StringUtils.capitalizeFirstLetter(property);
String methodName = "get" + methodBase;
try {
Method method = classMap.findMethod(methodName, CLASS_ARGS);
if (method == null) {
// perhaps this is a boolean property??
methodName = "is" + methodBase;
method = classMap.findMethod(methodName, CLASS_ARGS);
}
if (method == null) {
return null;
}
return method.invoke(value, OBJECT_ARGS);
} catch (InvocationTargetException e) {
throw new IntrospectionException(e.getTargetException());
} catch (AmbiguousException e) {
throw new IntrospectionException(e);
} catch (IllegalAccessException e) {
throw new IntrospectionException(e);
}
}