protected void printTags(Doc doc) {
        if(configuration.nocomment){
            return;
        }
        if (doc instanceof MethodDoc) {
            printMethodInfo((MethodDoc) doc);
        }
        TagletOutputImpl output = new TagletOutputImpl("");
        TagletWriter.genTagOuput(configuration.tagletManager, doc,
            configuration.tagletManager.getCustomTags(doc),
                getTagletWriterInstance(false), output);
        if (output.toString().trim().length() > 0) {
            printTagsInfoHeader();
            print(output.toString());
            printTagsInfoFooter();
        } else if (! (doc instanceof ConstructorDoc ||
            doc instanceof RootDoc || doc instanceof ClassDoc)) {
            //To be consistent with 1.4.2 output.
            //I hate to do this but we have to pass the diff test to prove
            //nothing has broken.
            printTagsInfoHeader();
            printTagsInfoFooter();
        }
    }