code: @Override // defined by AbstractDoclet
      protected void generatePackageFiles(ClassTree classtree) throws DocletException {
          Set<PackageElement> packages = configuration.packages;
          if (packages.size() > 1 && configuration.frames) {
              PackageIndexFrameWriter.generate(configuration);
          }
          List<PackageElement> pList = new ArrayList<>(packages);
          PackageElement prev = null;
          for (int i = 0 ; i < pList.size() ; i++) {
              // if -nodeprecated option is set and the package is marked as
              // deprecated, do not generate the package-summary.html, package-frame.html
              // and package-tree.html pages for that package.
              PackageElement pkg = pList.get(i);
              if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
                  if (configuration.frames) {
                      PackageFrameWriter.generate(configuration, pkg);
                  }
                  int nexti = i + 1;
                  PackageElement next = null;
                  if (nexti < pList.size()) {
                      next = pList.get(nexti);
                      // If the next package is unnamed package, skip 2 ahead if possible
                      if (next.isUnnamed() && ++nexti < pList.size()) {
                         next = pList.get(nexti);
                      }
                  }
                  AbstractBuilder packageSummaryBuilder =
                          configuration.getBuilderFactory().getPackageSummaryBuilder(
                          pkg, prev, next);
                  packageSummaryBuilder.build();
                  if (configuration.createtree) {
                      PackageTreeWriter.generate(configuration, pkg, prev, next,
                              configuration.nodeprecated);
                  }
                  prev = pkg;
              }
          }
      }
docs: {@inheritDoc}