Package javassist.bytecode.analysis
Class ControlFlow.Block
- java.lang.Object
-
- javassist.bytecode.stackmap.BasicBlock
-
- javassist.bytecode.analysis.ControlFlow.Block
-
- Enclosing class:
- ControlFlow
public static class ControlFlow.Block extends javassist.bytecode.stackmap.BasicBlockBasic block. It is a sequence of contiguous instructions that do not contain jump/branch instructions except the last one. Since Java6 or later does not allowJSR, we deal withJSRas a non-branch instruction.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.ObjectclientDataA field that can be freely used for storing extra data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ControlFlow.Catcher[]catchers()Returns catch clauses that will catch an exception thrown in this block.ControlFlow.Blockexit(int n)Returns the n-th block that may be executed after this block.intexits()Return the number of the blocks that may be executed after this block.ControlFlow.Blockincoming(int n)Returns the block that the control may jump into this block from.intincomings()Returns the number of the control paths entering this block.intindex()Returns the position of this block in the array of basic blocks that thebasicBlocksmethod returns.intlength()Returns the length of this block.intposition()Returns the position of the first instruction in this block.
-
-
-
Method Detail
-
index
public int index()
Returns the position of this block in the array of basic blocks that thebasicBlocksmethod returns.- See Also:
ControlFlow.basicBlocks()
-
position
public int position()
Returns the position of the first instruction in this block.
-
length
public int length()
Returns the length of this block.
-
incomings
public int incomings()
Returns the number of the control paths entering this block.
-
incoming
public ControlFlow.Block incoming(int n)
Returns the block that the control may jump into this block from.
-
exits
public int exits()
Return the number of the blocks that may be executed after this block.
-
exit
public ControlFlow.Block exit(int n)
Returns the n-th block that may be executed after this block.- Parameters:
n- an index in the array of exit blocks.
-
catchers
public ControlFlow.Catcher[] catchers()
Returns catch clauses that will catch an exception thrown in this block.
-
-