All Downloads are FREE. Search and download functionalities are using the official Maven repository.

name.remal.asm.AsmUtils Maven / Gradle / Ivy

package name.remal.asm;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;

import java.lang.reflect.Field;

public class AsmUtils {

    public static final int ASM_API;

    static {
        try {
            ClassWriter classWriter = new ClassWriter(0);
            Field apiField = ClassVisitor.class.getDeclaredField("api");
            apiField.setAccessible(true);
            ASM_API = apiField.getInt(classWriter);

        } catch (NoSuchFieldException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy