// Path: jar-analyzer/src/main/java/mb/jar_analyzer/TypeUtil.java
// public final class TypeUtil {
// 
//     public static Optional<String> getTypeName(Type type) {
//         switch(type.getSort()) {
//             case Type.ARRAY:
//                 return getTypeName(type.getElementType());
//             case Type.OBJECT:
//                 return Optional.of(type.getInternalName());
//             default:
//                 return Optional.empty();
//         }
//     }
// 
// }
// 
// Path: jar-analyzer/src/main/java/mb/jar_analyzer/jar/ClassProcessor.java
// @FunctionalInterface
// public interface ClassProcessor {
// 
//     void accept(ClassReader classReader);
// 
// }


import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Handle;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimaps;
import com.google.common.collect.SetMultimap;
import com.google.common.collect.Sets;
import mb.jar_analyzer.TypeUtil;
import mb.jar_analyzer.jar.ClassProcessor;
            }

            @Override public void visitInvokeDynamicInsn(String name, String desc, Handle bootstrapMethodHandle,
                    Object... bootstrapMethodArguments) {
                Type type = Type.getMethodType(desc);
                addDependency(type.getReturnType().getInternalName());
                for(Type param : type.getArgumentTypes()) {
                    addDependency(param.getInternalName());
                }
            }

            @Override public void visitLdcInsn(Object value) {
                if(value instanceof Type) {
                    addDependency(((Type) value).getInternalName());
                }
            }

        };
    }

    @Override public void visitEnd() {
        currentName = null;
    }

    private void addDependency(String typeOrName) {
        if(typeOrName == null) {
            return;
        }
        String name = null;
        try {
// Path: jar-analyzer/src/main/java/mb/jar_analyzer/TypeUtil.java
// public final class TypeUtil {
// 
//     public static Optional<String> getTypeName(Type type) {
//         switch(type.getSort()) {
//             case Type.ARRAY:
//                 return getTypeName(type.getElementType());
//             case Type.OBJECT:
//                 return Optional.of(type.getInternalName());
//             default:
//                 return Optional.empty();
//         }
//     }
// 
// }
// 
// Path: jar-analyzer/src/main/java/mb/jar_analyzer/jar/ClassProcessor.java
// @FunctionalInterface
// public interface ClassProcessor {
// 
//     void accept(ClassReader classReader);
// 
// }


// Path: jar-analyzer/src/main/java/mb/jar_analyzer/deps/DependencyCollector.java
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Handle;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimaps;
import com.google.common.collect.SetMultimap;
import com.google.common.collect.Sets;
import mb.jar_analyzer.TypeUtil;
import mb.jar_analyzer.jar.ClassProcessor;

            }

            @Override public void visitInvokeDynamicInsn(String name, String desc, Handle bootstrapMethodHandle,
                    Object... bootstrapMethodArguments) {
                Type type = Type.getMethodType(desc);
                addDependency(type.getReturnType().getInternalName());
                for(Type param : type.getArgumentTypes()) {
                    addDependency(param.getInternalName());
                }
            }

            @Override public void visitLdcInsn(Object value) {
                if(value instanceof Type) {
                    addDependency(((Type) value).getInternalName());
                }
            }

        };
    }

    @Override public void visitEnd() {
        currentName = null;
    }

    private void addDependency(String typeOrName) {
        if(typeOrName == null) {
            return;
        }
        String name = null;
        try {
            name = TypeUtil.getTypeName(Type.getType(typeOrName)).orElse(null);