You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by roopa kannan <ro...@gmail.com> on 2006/02/23 01:52:45 UTC

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

Re: Fetching IF operands

Posted by Dave Brosius <db...@apache.org>.
>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" <ro...@gmail.com>
To: <bc...@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: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org