code: protected void addComment(Element element, Content contentTree) {
          List<? extends DocTree> tags;
          Content span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(element));
          HtmlTree div = new HtmlTree(HtmlTag.DIV);
          div.addStyle(HtmlStyle.block);
          if (utils.isDeprecated(element)) {
              div.addContent(span);
              tags = utils.getBlockTags(element, DocTree.Kind.DEPRECATED);
              if (!tags.isEmpty())
                  addInlineDeprecatedComment(element, tags.get(0), div);
              contentTree.addContent(div);
          } else {
              TypeElement encl = utils.getEnclosingTypeElement(element);
              while (encl != null) {
                  if (utils.isDeprecated(encl)) {
                      div.addContent(span);
                      contentTree.addContent(div);
                      break;
                  }
                  encl = utils.getEnclosingTypeElement(encl);
              }
              addSummaryComment(element, contentTree);
          }
      }
docs: Add comment for each element in the index. If the element is deprecated
  and it has a @deprecated tag, use that comment. Else if the containing
  class for this element is deprecated, then add the word "Deprecated." at
  the start and then print the normal comment.
  
  @param element Index element
  @param contentTree the content tree to which the comment will be added