code: protected void addPackageTreeLinks(Content contentTree) {
          //Do nothing if only unnamed package is used
          if (isUnnamedPackage()) {
              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);
              int i = 0;
              for (PackageDoc pkg : packages) {
                  // 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 (pkg.name().isEmpty() ||
                          (configuration.nodeprecated && utils.isDeprecated(pkg))) {
                      i++;
                      continue;
                  }
                  DocPath link = pathString(pkg, DocPaths.PACKAGE_TREE);
                  Content li = HtmlTree.LI(getHyperLink(
                          link, new StringContent(pkg.name())));
                  if (i < packages.size() - 1) {
                      li.addContent(", ");
                  }
                  ul.addContent(li);
                  i++;
              }
              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