Combining multiple Java classes with ASM at runtime

I would like to merge several java classes into one. I read the ASM documentation and http://www.jroller.com/eu/entry/merging_class_methods_with_asm , but I don’t understand how I can achieve my goal.

Are there more detailed examples about this?

thanks

+4
source share
1 answer

from java 1.5 there is a function called a tool that allows you to manipulate the byte code of the program at runtime. In addition, you can also manipulate byte code when the class loader loads a specific class into JVM memory. the ASM framework provides you with tools to easily manipulate byte code by converting the byte code assembler to something readable and add some utilities to simplify your work. note that manipulating byte code is a very advanced technique, and you really need to know about the JVM and byte code before you do this. I personally suggest you make the ideas that appear above. but if you still insist on it, I suggest you familiarize yourself with the tools here: http://www.javalobby.org/java/forums/t19309.html and a deep dive into the framework of ASM or javaassist: http: //sleeplessinslc.blogspot .co.il / 2008/07 / java-instrumentation.html I think java assist is easier for me to offer to work with this. I was hoping to help

0
source

All Articles