public static Map<String, CompiledClass> parseClassFilesInJar(File jar) {
    Map<String, CompiledClass> result = new HashMap<>();
    try (JarFile jarfile = new JarFile(jar)) {
      for (Enumeration<JarEntry> entries = jarfile.entries(); entries.hasMoreElements();) {
        JarEntry entry = entries.nextElement();
        if (entry.getName().endsWith(".class")) {
          try {
            CompiledClass parsed = CompiledClass.getInstance(jarfile.getInputStream(entry));
            if (!parsed.isInterface()) {
              result.put(parsed.fullyQualifiedName(), parsed);
            }
          } catch (IOException e) {
            System.err
                .println("Exception while parsing " + entry.getName() + ": " + e.getMessage());
          }
        }
      }
    } catch (IOException e) {
      System.err.println("Error opening jar file:");
      e.printStackTrace(System.err);
    }
    return result;
  }
Parse the files in the given jar file and return a map of name-&gt;CompiledClass. Any IO
exceptions are consumed by this method and written to stderr.

@param jar the jar file holding classes
@return a map of name-&gt;CompiledClass
geode-junit/src/main/java/org/apache/geode/codeAnalysis/CompiledClassUtils.java