code: private Map<String,List<JavaFileObject>> searchSubPackages(
              List<String> subPackages,
              ListBuffer<String> packages,
              List<String> excludedPackages)
              throws IOException {
          Map<String,List<JavaFileObject>> packageFiles =
                  new HashMap<String,List<JavaFileObject>>();
  
          Map<String,Boolean> includedPackages = new HashMap<String,Boolean>();
          includedPackages.put("", true);
          for (String p: excludedPackages)
              includedPackages.put(p, false);
  
          StandardLocation path = docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH)
                  ? StandardLocation.SOURCE_PATH : StandardLocation.CLASS_PATH;
  
          searchSubPackages(subPackages,
                  includedPackages,
                  packages, packageFiles,
                  path,
                  EnumSet.of(JavaFileObject.Kind.SOURCE));
  
          return packageFiles;
      }
docs: Recursively search all directories in path for subdirectory name.
  Add all packages found in such a directory to packages list.