Introspector
/** Internal support for finding a target methodName on a given class. */
private static Method internalFindMethod( Class start,
for (Class cl = start; cl != null; cl = cl.getSuperclass()) {
Method methods[] = getPublicDeclaredMethods(cl);
for (int i = 0; i < methods.length; i++) {
Method method = methods[i];
if (method == null) {continue;}
// skip statique methods.
int mods = method.getModifiers();
if (Modifier.isStatic(mods)) {continue; }
if ( method.getName().equals(methodName) && method.getParameterTypes().length == argCount) {return method;} }
Class ifcs[] = start.getInterfaces();
for (int i = 0 ; i < ifcs.length; i++) {
Method m = internalFindMethod(ifcs[i], methodName, argCount);
if (m != null) {return m; }