code: protected void addPackageTreeLinks(Content contentTree) {
          //Do nothing if only unnamed package is used
          if (packages.length == 1 && packages[0].name().length() == 0) {
              return;
          }
          if (!classesonly) {
              Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
                      getResource("doclet.Package_Hierarchies"));
              contentTree.addContent(span);
              HtmlTree ul = new HtmlTree(HtmlTag.UL);
              ul.addStyle(HtmlStyle.horizontal);
              for (int i = 0; i < packages.length; i++) {
                  // If the package name length is 0 or if -nodeprecated option
                  // is set and the package is marked as deprecated, do not include
                  // the page in the list of package hierarchies.
                  if (packages[i].name().length() == 0 ||
                          (configuration.nodeprecated && Util.isDeprecated(packages[i]))) {
                      continue;
                  }
                  DocPath link = pathString(packages[i], DocPaths.PACKAGE_TREE);
                  Content li = HtmlTree.LI(getHyperLink(
                          link, new StringContent(packages[i].name())));
                  if (i < packages.length - 1) {
                      li.addContent(", ");
                  }
                  ul.addContent(li);
              }
              contentTree.addContent(ul);
          }
      }
docs: Add the links to all the package tree files.
  
  @param contentTree the content tree to which the links will be added