String methodName = method.getName(); Class[] parameterTypes = method.getParameterTypes();
    private static Method getAccessibleMethod(Method method) {        // Make sure we have a method to check        if (method == null) {            return (null);        }        // If the requested method is not public we cannot call it        if (!Modifier.isPublic(method.getModifiers())) {            log("Method is not public");            return (null);        }        // If the declaring class is public, we are done        Class clazz = method.getDeclaringClass();        if (Modifier.isPublic(clazz.getModifiers())) {            log("Class is public");            return (method);        }                if (debug) {            log("Method is in non-public class " + clazz);        }        // Check the implemented interfaces and subinterfaces        String methodName = method.getName();        Class[] parameterTypes = method.getParameterTypes();        method =                getAccessibleMethodFromInterfaceNest(clazz,                        method.getName(),                        method.getParameterTypes());        return (method);    }