// Path: instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/InternalUtils.java
// static ClassInformation getClassInformation(final InputStream is) throws IOException {
//     ClassReader classReader = new ClassReader(is);
//     String name = classReader.getClassName();
//         
//     String superName = classReader.getSuperName();
//     String[] interfaces = classReader.getInterfaces();
//     boolean interfaceMarker = (classReader.getAccess() & Opcodes.ACC_INTERFACE) != 0;
// 
//     return new ClassInformation(name, superName, Arrays.asList(interfaces), interfaceMarker);
// }


import static com.offbynull.coroutines.instrumenter.asm.InternalUtils.getClassInformation;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.compress.archivers.jar.JarArchiveEntry;
import org.apache.commons.compress.archivers.jar.JarArchiveInputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.Validate;
        Validate.notNull(directory);
        Validate.isTrue(directory.isDirectory());
        for (File file : FileUtils.listFiles(directory, new String[] {"class"}, true)) {
            if (!file.getName().endsWith(".class")) {
                continue;
            }
            
            try (InputStream is = new FileInputStream(file)) {
                populateSuperClassMapping(is);
            }
        }
    }

    private void addJar(File file) throws IOException {
        Validate.notNull(file);
        Validate.isTrue(file.isFile());
        try (FileInputStream fis = new FileInputStream(file);
                JarArchiveInputStream jais = new JarArchiveInputStream(fis)) {
            JarArchiveEntry entry;
            while ((entry = jais.getNextJarEntry()) != null) {
                if (!entry.getName().endsWith(".class") || entry.isDirectory()) {
                    continue;
                }

                populateSuperClassMapping(jais);
            }
        }
    }
    
    private void populateSuperClassMapping(final InputStream is) throws IOException {
// Path: instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/InternalUtils.java
// static ClassInformation getClassInformation(final InputStream is) throws IOException {
//     ClassReader classReader = new ClassReader(is);
//     String name = classReader.getClassName();
//         
//     String superName = classReader.getSuperName();
//     String[] interfaces = classReader.getInterfaces();
//     boolean interfaceMarker = (classReader.getAccess() & Opcodes.ACC_INTERFACE) != 0;
// 
//     return new ClassInformation(name, superName, Arrays.asList(interfaces), interfaceMarker);
// }


// Path: instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/FileSystemClassInformationRepository.java
import static com.offbynull.coroutines.instrumenter.asm.InternalUtils.getClassInformation;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.compress.archivers.jar.JarArchiveEntry;
import org.apache.commons.compress.archivers.jar.JarArchiveInputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.Validate;

        Validate.notNull(directory);
        Validate.isTrue(directory.isDirectory());
        for (File file : FileUtils.listFiles(directory, new String[] {"class"}, true)) {
            if (!file.getName().endsWith(".class")) {
                continue;
            }
            
            try (InputStream is = new FileInputStream(file)) {
                populateSuperClassMapping(is);
            }
        }
    }

    private void addJar(File file) throws IOException {
        Validate.notNull(file);
        Validate.isTrue(file.isFile());
        try (FileInputStream fis = new FileInputStream(file);
                JarArchiveInputStream jais = new JarArchiveInputStream(fis)) {
            JarArchiveEntry entry;
            while ((entry = jais.getNextJarEntry()) != null) {
                if (!entry.getName().endsWith(".class") || entry.isDirectory()) {
                    continue;
                }

                populateSuperClassMapping(jais);
            }
        }
    }
    
    private void populateSuperClassMapping(final InputStream is) throws IOException {
        ClassInformation ci = getClassInformation(is);