public MethodInfo getMethod(String name) {
        ArrayList list = methods;
        int n = list.size();
        for (int i = 0; i < n; ++i) {
            MethodInfo minfo = (MethodInfo)list.get(i);
            if (minfo.getName().equals(name))
                return minfo;
        }

        return null;
    }