private int writeTreeForClassHelper(Type type) {
        Type sup = Util.getFirstVisibleSuperClass(
            type instanceof ClassDoc ? (ClassDoc) type : type.asClassDoc(),
            configuration());
        int indent = 0;
        if (sup != null) {
            indent = writeTreeForClassHelper(sup);
            writeStep(indent);
        }

        if (type.equals(classDoc)) {
            String typeParameters = getTypeParameterLinks(
                new LinkInfoImpl(
                    LinkInfoImpl.CONTEXT_TREE,
                    classDoc, false));
            if (configuration.shouldExcludeQualifier(
                    classDoc.containingPackage().name())) {
                bold(type.asClassDoc().name() + typeParameters);
            } else {
                bold(type.asClassDoc().qualifiedName() + typeParameters);
            }
        } else {
            print(getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_TREE_PARENT,
                    type instanceof ClassDoc ? (ClassDoc) type : type,
                    configuration.getClassName(type.asClassDoc()), false)));
        }
        println();
        return indent + 1;
    }