code: public static void generate(ConfigurationImpl configuration,
                                  PackageDoc pkg, PackageDoc prev,
                                  PackageDoc next, boolean noDeprecated) {
          PackageTreeWriter packgen;
          DocPath path = DocPath.forPackage(pkg).resolve(DocPaths.PACKAGE_TREE);
          try {
              packgen = new PackageTreeWriter(configuration, path, pkg,
                  prev, next);
              packgen.generatePackageTreeFile();
              packgen.close();
          } catch (IOException exc) {
              configuration.standardmessage.error(
                          "doclet.exception_encountered",
                          exc.toString(), path.getPath());
              throw new DocletAbortException(exc);
          }
      }
docs: Construct a PackageTreeWriter object and then use it to generate the
  package tree page.
  
  @param pkg      Package for which tree file is to be generated.
  @param prev     Previous package in the alpha-ordered list.
  @param next     Next package in the alpha-ordered list.
  @param noDeprecated  If true, do not generate any information for
  deprecated classe or interfaces.
  @throws DocletAbortException