in src/main/java/org/apache/sling/scripting/sightly/compiler/util/ObjectModel.java [388:403]
public static Object invokeBeanMethod(Object object, String methodName) {
if (object == null || StringUtils.isEmpty(methodName)) {
return null;
}
Class<?> cls = object.getClass();
Method method = findBeanMethod(cls, methodName);
if (method != null) {
try {
method = extractMethodInheritanceChain(cls, method);
return method.invoke(object);
} catch (Exception e) {
LOGGER.error("Cannot access method " + methodName + " on object " + object.toString(), e);
}
}
return null;
}