private Collection subinterfaces(ClassDoc cd) {
        Collection ret = (Collection)classToSubinterface.get(cd.qualifiedName());
        if (ret == null) {
            ret = new TreeSet();
            List subs = classtree.subinterfaces(cd);
            if (subs != null) {
                ret.addAll(subs);
                for (Iterator it = subs.iterator(); it.hasNext();) {
                    ret.addAll(subinterfaces((ClassDoc)it.next()));
                }
            }
            addAll(classToSubinterface, cd, ret);
        }
        return ret;
    }