This content has been marked as final.
Show 2 replies
-
1. Re: Method Content Comparison
swd847 Dec 16, 2011 12:04 AM (in response to chicken_bones)I think you would have to use a CodeIterator to go over the code one instruction at a time and compare them. You need to make sure that the instructions are the same, and also that the value of any items that they point to in the const pool is also the same. A complete list of the bytecode instructions can be found at:
http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html
-
2. Re: Method Content Comparison
chicken_bones Dec 17, 2011 6:11 PM (in response to swd847)Thankyou very much for pointing me in the right direction. I managed to find InstructionPrinter which gave me a template to follow for extra info comparison. It works perfectly now.