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

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