protected void printExtendsImplements(ClassDoc parent, ClassDoc cd) {
        ClassDoc[] interfaces = cd.interfaces();
        if (interfaces.length > (cd.isInterface()? 1 : 0)) {
            Arrays.sort(interfaces);
            int counter = 0;
            for (int i = 0; i < interfaces.length; i++) {
                if (parent != interfaces[i]) {
                    if (! (interfaces[i].isPublic() ||
                            Util.isLinkable(interfaces[i], configuration()))) {
                        continue;
                    }
                    if (counter == 0) {
                        if (cd.isInterface()) {
                            print(" (" + configuration.getText("doclet.also") + " extends ");
                        } else {
                            print(" (implements ");
                        }
                    } else {
                        print(", ");
                    }
                    printPreQualifiedClassLink(LinkInfoImpl.CONTEXT_TREE,
                        interfaces[i]);
                    counter++;
                }
            }
            if (counter > 0) {
                println(")");
            }
        }
    }