raphw / byte-buddy

Runtime code generation for the Java virtual machine.
https://bytebuddy.net
Apache License 2.0
6.29k stars 807 forks source link

Questions about alternatives to the LocalVariablesSorter class obsoletization #1691

Closed zhangzhen91 closed 2 months ago

zhangzhen91 commented 3 months ago

First off - thanks for an awesome library.

The new version of the LocalVariablesSorter class has been deprecated. What is the alternative?

Looking forward to your reply. Thanks!

raphw commented 3 months ago

That's an ASM class and it does not seem to be deprecated? https://gitlab.ow2.org/asm/asm/-/blob/master/asm-commons/src/main/java/org/objectweb/asm/commons/LocalVariablesSorter.java

zhangzhen91 commented 3 months ago

Thank you for your answer. I think you misunderstood what I meant. What I mean is that the old version of bytebuddy also has this class similar to asm, but it is not found in the new version. I would like to ask if it is deprecated? What are the alternatives? Looking forward to your response.

zhangzhen91 commented 3 months ago

byte-buddy-0.6.12 net.bytebuddy.jar.asm.commons.LocalVariablesSorter

raphw commented 3 months ago

You can add asm-utils which contains this visitor. You can add it using: ClassVisitorFactory to map between the namespaces.

zhangzhen91 commented 2 months ago

ok. I roughly understand how to do it. Thank you very much.