com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIfStm |
C AST interface to represent a conditional "if" statement.
An if-statement consists of one or more branches (if, else-if) followed by an optional default branch (else) block.
Example:
if(p) b else if(p1) b1 else b2
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addBranch(ICPredicate p, ICBlock b)
Add an alternative block (if or else-if) to this element.
| ||||||||||
abstract ICIfStm |
duplicate()
Deep duplication of the element.
| ||||||||||
abstract ICBlock | getBranchBody(int index) | ||||||||||
abstract ICPredicate | getBranchPredicate(int index) | ||||||||||
abstract List<? extends ICPredicate> |
getBranchPredicates()
Get the predicates.
| ||||||||||
abstract void | insertBranch(int index, ICPredicate p, ICBlock b) | ||||||||||
abstract void | removeBranch(int index) | ||||||||||
abstract ICBlock |
removeDefaultBlock()
Remove the default block, if there one, and return it.
| ||||||||||
abstract void | setBranchBody(int index, ICBlock b) | ||||||||||
abstract void | setBranchPredicate(int index, ICPredicate p) | ||||||||||
abstract void |
setDefaultBlock(ICBlock b)
Set the default block of code.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICCompound
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICConditionalStatement
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement
|
Add an alternative block (if or else-if) to this element.
p | mandatory predicate |
---|---|
b | mandatory statement |
Deep duplication of the element. Sub-elements are duplicated.
Note: ICClass
, ICMethod
, ICField
, ICIdentifier
,
ICConstant
, ICType
and ICLabel
are not duplicated.
Get the predicates. Warning, this is the actual list of predicates, not a copy. Caution should be exercised when modifying it
Remove the default block, if there one, and return it.
Set the default block of code.
b | optional block, set to null to remove the default block |
---|