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