int paramSize = parameterTypes.length;
    private static Method[] getCompatibleMethods(                                                Class clazz,                                                String methodName,                                                Class[] parameterTypes) {        // trace logging        if (debug) {            log("Matching name=" + methodName + " on " + clazz);        }                // search through all methods         int paramSize = parameterTypes.length;        Method[] methods = clazz.getMethods();        ArrayList compatibles = new ArrayList(methods.length);        for (int i = 0, size = methods.length; i < size ; i++) {            if (debug) {                log("Checking: " + methods[i]);            }                 if (methods[i].getName().equals(methodName)) {	                // log some trace information                if (debug) {                    log("Found matching name:" + methods[i]);                }                                                // compare parameters                Class[] methodsParams = methods[i].getParameterTypes();                if (ReflectionUtils.isCompatible(parameterTypes, methodsParams)) {                    // get accessible version of method                    Method method = getMethod(methods[i]);                    if (method != null) {                        compatibles.add(method);                    } else {                        log("Couldn't find accessible method for: " + methods[i]);                    }                }            }        }                return (Method[]) compatibles.toArray(new Method[compatibles.size()]);     }  