If have an "invokevirtual" Instruction. How can I
obtain the information which method is actually
being called?
InstructionList il = mg.getInstructionList();
InstructionHandle[] ihs = il.getInstructionHandles();
for (int j = 1; j < ihs.length; j++) {
Instruction in = ihs[j].getInstruction();
if (in.getOpcode() == 182) {
// invoke virtual
// if (in invokes "mymethod") ...
System.out.println(in);
}
}
il.dispose();
I wanna find calls to a certain method and prefix/postfix
it with some instructions later. Or maybe even replace it.
Thanks
--
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]