code: protected void addIndex(Content body) {
          for (int i = 0; i < groupList.size(); i++) {
          String groupname = groupList.get(i);
          List<PackageDoc> list = groupPackageMap.get(groupname);
              if (list != null && list.size() > 0) {
                  addIndexContents(list.toArray(new PackageDoc[list.size()]),
                          groupname, configuration.getText("doclet.Member_Table_Summary",
                          groupname, configuration.getText("doclet.packages")), body);
              }
          }
      }
docs: Depending upon the grouping information and their titles, add
  separate table indices for each package group.
  
  @param body the documentation tree to which the index will be added