Reputation: 644
Would like to take a look at the byte code size of a method to see how far it is to the maximum length(64KB). How could I do that?
Upvotes: 4
Views: 2532
Reputation: 1500225
One option is to use javap -c YourClassName - that will show you the byte offsets of each instruction for each method.
javap -c YourClassName
Alternatively, to do this programmatically, I strongly suspect BCEL or ASM will help you out.
Upvotes: 5