public String mapMethodName(String cls, String name, String descriptor) {
        // Check the class itself first.
        String key = cls + "/" + name + ";" + descriptor;
        if (methods.containsKey(key)) {
            return methods.get(key);
        }

        // Then all of its ancestors
        for (String ancestor : inheritance.getAncestors(cls)) {
            key = ancestor + "/" + name + ";" + descriptor;
            if (methods.containsKey(key)) {
                return methods.get(key);
            }
        }
        return name;
    }