in src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java [449:470]
private Map<String, Method> getAllDeclaredMethods(Class<?> c) {
// stop (and do not include) the AbstractSlingServletClass
if (c == null
|| c.getName().equals(SlingSafeMethodsServlet.class.getName())) {
return new HashMap<String, Method>();
}
// get the declared methods from the base class
Map<String, Method> methodSet = getAllDeclaredMethods(c.getSuperclass());
// add declared methods of c (maybe overwrite base class methods)
Method[] declaredMethods = c.getDeclaredMethods();
for (Method method : declaredMethods) {
// only consider public and protected methods
if (Modifier.isProtected(method.getModifiers())
|| Modifier.isPublic(method.getModifiers())) {
methodSet.put(method.getName(), method);
}
}
return methodSet;
}