Why doesn't ASM call my ``visitCode``?
问题 I'll add my code to the end of this post. I'm using byteBuddy 1.7.9 and whatever ASM version comes with that. In a nutshell I have byte[] rawClass = ...; ClassReader cr = new ClassReader(rawClass); ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); MethodAdder ma = new MethodAdder(Opcodes.ASM5,cw); cr.accept(ma,ClassReader.EXPAND_FRAMES); Where in MethodAdder , I want to add a static initialiser: @Override public MethodVisitor visitMethod(int access, String name, String desc,