code: protected void setTopFile(RootDoc root) {
          if (!checkForDeprecation(root)) {
              return;
          }
          if (createoverview) {
              topFile = DocPaths.OVERVIEW_SUMMARY;
          } else {
              if (packages.length == 1 && packages[0].name().equals("")) {
                  if (root.classes().length > 0) {
                      ClassDoc[] classarr = root.classes();
                      Arrays.sort(classarr);
                      ClassDoc cd = getValidClass(classarr);
                      topFile = DocPath.forClass(cd);
                  }
              } else {
                  topFile = DocPath.forPackage(packages[0]).resolve(DocPaths.PACKAGE_SUMMARY);
              }
          }
      }
docs: Decide the page which will appear first in the right-hand frame. It will
  be "overview-summary.html" if "-overview" option is used or no
  "-overview" but the number of packages is more than one. It will be
  "package-summary.html" of the respective package if there is only one
  package to document. It will be a class page(first in the sorted order),
  if only classes are provided on the command line.
  
  @param root Root of the program structure.