public final int getMethodIndex(String originalName, Class[] argTypes)
        throws NoSuchMethodException
    {
        Method[] mthds = getReflectiveMethods();
        for (int i = 0; i < mthds.length; i++) {
            if (mthds[i] == null)
                continue;

            // check name and parameter types match
            if (getMethodName(i).equals(originalName)
                && Arrays.equals(argTypes, mthds[i].getParameterTypes()))
                return i;
        }

        throw new NoSuchMethodException("Method " + originalName
                                        + " not found");
    }