@Override
  public @NotNull ClasspathCache.IndexRegistrar buildClassPathCacheData() {
    // name hash is not added - doesn't make sense as fast lookup by name is supported by ImmutableZipFile
    if (zipFile instanceof ImmutableZipFile) {
      ImmutableZipFile file = (ImmutableZipFile)zipFile;
      return new ClasspathCache.IndexRegistrar() {
        @Override
        public int classPackageCount() {
          return file.classPackages.length;
        }

        @Override
        public int resourcePackageCount() {
          return file.resourcePackages.length;
        }

        @Override
        public long[] classPackages() {
          return file.classPackages;
        }

        @Override
        public long[] resourcePackages() {
          return file.resourcePackages;
        }
      };
    }
    else if (zipFile instanceof EmptyZipFile) {
      return new ClasspathCache.LoaderDataBuilder();
    }
    else {
      return computePackageIndex();
    }
  }
@Override
  public @NotNull ClasspathCache.IndexRegistrar buildClassPathCacheData()