From the MethodGen, you can get an InstructionList, from which you can get a
list of Instructions.
Once you've found the Instruction that represents the if statement you want,
cast it to an IfInstruction

From there you can get the target offset (the operand)


----- Original Message ----- From: "roopa kannan" <[EMAIL PROTECTED]>
To: <bcel-user@jakarta.apache.org>
Sent: Wednesday, February 22, 2006 7:52 PM
Subject: Fetching IF operands


Hi,

I have this requirement of fetching the operands of the IfInstruction from
the class file,
I am looking for help on how to proceed to fetch the operand values of
IfInstructions
I could find how many operands the IfInstruction consumes
using the consumestack method
but i want to find the actual operands
can anyone guide me how to proceed

Thankyou very much


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to