public void addRoots(ZipFile jarOfRoots) throws IOException {

    // keep roots
    for (Enumeration<? extends ZipEntry> entries = jarOfRoots.entries();
        entries.hasMoreElements(); ) {
      ZipEntry entry = entries.nextElement();
      String name = entry.getName();
      if (name.endsWith(CLASS_EXTENSION)) {
        classNames.add(name.substring(0, name.length() - CLASS_EXTENSION.length()));
      }
    }

    // keep direct references of roots (+ direct references hierarchy)
    for (Enumeration<? extends ZipEntry> entries = jarOfRoots.entries();
        entries.hasMoreElements(); ) {
      ZipEntry entry = entries.nextElement();
      String name = entry.getName();
      if (name.endsWith(CLASS_EXTENSION)) {
        DirectClassFile classFile;
        try {
          classFile = path.getClass(name);
        } catch (FileNotFoundException e) {
          throw new IOException(
              "Class " + name + " is missing form original class path " + path, e);
        }
        addDependencies(classFile);
      }
    }
  }
@param jarOfRoots Archive containing the class files resulting of the tracing, typically this
    is the result of running ProGuard.
android/android_framework/dex-maker/src/main/java/com/android/multidex/ClassReferenceListBuilder.java