// Path: promagent-framework/promagent-internal/src/main/java/io/promagent/internal/HookMetadata.java
// public static class MethodSignature implements Comparable<MethodSignature> {
// 
//     private final String methodName;
//     private final List<String> parameterTypes;
// 
//     public MethodSignature(String methodName, List<String> parameterTypes) {
//         this.methodName = methodName;
//         this.parameterTypes = Collections.unmodifiableList(new ArrayList<>(parameterTypes));
//     }
// 
//     public String getMethodName() {
//         return methodName;
//     }
// 
//     public List<String> getParameterTypes() {
//         return parameterTypes;
//     }
// 
//     @Override
//     public String toString() {
//         return methodName + "(" + String.join(", ", parameterTypes) + ")";
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         return o != null && getClass() == o.getClass() && compareTo((MethodSignature) o) == 0;
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hash(toString());
//     }
// 
//     @Override
//     public int compareTo(MethodSignature o) {
//         return Comparator
//                 .comparing(MethodSignature::getMethodName)
//                 .thenComparing(MethodSignature::getParameterTypes, new LexicographicalComparator<>())
//                 .compare(this, o);
//     }
// }


import io.promagent.annotations.After;
import io.promagent.annotations.Before;
import io.promagent.annotations.Returned;
import io.promagent.annotations.Thrown;
import io.promagent.internal.HookMetadata.MethodSignature;
import net.bytebuddy.jar.asm.*;
import org.apache.commons.io.IOUtils;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
    }


    /**
     * Helper to create {@link HookMetadata} isntances.
     */
    private static class HookMetadataBuilder {

        private String hookClassName;
        private List<String> instruments = new ArrayList<>();
        private List<MethodSignatureBuilder> methods = new ArrayList<>();

        private HookMetadataBuilder(String hookClassName) {
            this.hookClassName = hookClassName;
        }

        private void addInstruments(String instruments) {
            this.instruments.add(instruments);
        }

        private MethodSignatureBuilder newMethodSignature(List<String> parameterTypes) {
            MethodSignatureBuilder builder = new MethodSignatureBuilder();
            for (String parameterType : parameterTypes) {
                builder.addParameterType(parameterType);
            }
            methods.add(builder);
            return builder;
        }

        private HookMetadata build() {
// Path: promagent-framework/promagent-internal/src/main/java/io/promagent/internal/HookMetadata.java
// public static class MethodSignature implements Comparable<MethodSignature> {
// 
//     private final String methodName;
//     private final List<String> parameterTypes;
// 
//     public MethodSignature(String methodName, List<String> parameterTypes) {
//         this.methodName = methodName;
//         this.parameterTypes = Collections.unmodifiableList(new ArrayList<>(parameterTypes));
//     }
// 
//     public String getMethodName() {
//         return methodName;
//     }
// 
//     public List<String> getParameterTypes() {
//         return parameterTypes;
//     }
// 
//     @Override
//     public String toString() {
//         return methodName + "(" + String.join(", ", parameterTypes) + ")";
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         return o != null && getClass() == o.getClass() && compareTo((MethodSignature) o) == 0;
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hash(toString());
//     }
// 
//     @Override
//     public int compareTo(MethodSignature o) {
//         return Comparator
//                 .comparing(MethodSignature::getMethodName)
//                 .thenComparing(MethodSignature::getParameterTypes, new LexicographicalComparator<>())
//                 .compare(this, o);
//     }
// }


// Path: promagent-framework/promagent-internal/src/main/java/io/promagent/internal/HookMetadataParser.java
import io.promagent.annotations.After;
import io.promagent.annotations.Before;
import io.promagent.annotations.Returned;
import io.promagent.annotations.Thrown;
import io.promagent.internal.HookMetadata.MethodSignature;
import net.bytebuddy.jar.asm.*;
import org.apache.commons.io.IOUtils;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

    }


    /**
     * Helper to create {@link HookMetadata} isntances.
     */
    private static class HookMetadataBuilder {

        private String hookClassName;
        private List<String> instruments = new ArrayList<>();
        private List<MethodSignatureBuilder> methods = new ArrayList<>();

        private HookMetadataBuilder(String hookClassName) {
            this.hookClassName = hookClassName;
        }

        private void addInstruments(String instruments) {
            this.instruments.add(instruments);
        }

        private MethodSignatureBuilder newMethodSignature(List<String> parameterTypes) {
            MethodSignatureBuilder builder = new MethodSignatureBuilder();
            for (String parameterType : parameterTypes) {
                builder.addParameterType(parameterType);
            }
            methods.add(builder);
            return builder;
        }

        private HookMetadata build() {
            SortedSet<MethodSignature> methodSignatures = new TreeSet<>();