code: public void addSrcLink(ProgramElementDoc doc, Content label, Content htmltree) {
          if (doc == null) {
              return;
          }
          ClassDoc cd = doc.containingClass();
          if (cd == null) {
              //d must be a class doc since in has no containing class.
              cd = (ClassDoc) doc;
          }
          DocPath href = pathToRoot
                  .resolve(DocPaths.SOURCE_OUTPUT)
                  .resolve(DocPath.forClass(cd));
          Content linkContent = getHyperLink(href.fragment(SourceToHTMLConverter.getAnchorName(doc)), label, "", "");
          htmltree.addContent(linkContent);
      }
docs: Add the link to the content tree.
  
  @param doc program element doc for which the link will be added
  @param label label for the link
  @param htmltree the content tree to which the link will be added