Package javassist.bytecode.analysis
Class ControlFlow.Block
java.lang.Object
javassist.bytecode.stackmap.BasicBlock
javassist.bytecode.analysis.ControlFlow.Block
- Enclosing class:
ControlFlow
Basic 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 allow
JSR
,
we deal with JSR
as a non-branch instruction.-
Nested Class Summary
Nested classes/interfaces inherited from class javassist.bytecode.stackmap.BasicBlock
BasicBlock.Catch, BasicBlock.Maker
-
Field Summary
FieldsModifier and TypeFieldDescriptionA field that can be freely used for storing extra data.(package private) ControlFlow.Block[]
(package private) int
(package private) MethodInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncatchers()
Returns catch clauses that will catch an exception thrown in this block.exit
(int n) Returns the n-th block that may be executed after this block.int
exits()
Return the number of the blocks that may be executed after this block.(package private) BasicBlock[]
getExit()
incoming
(int n) Returns the block that the control may jump into this block from.int
Returns the number of the control paths entering this block.int
index()
Returns the position of this block in the array of basic blocks that thebasicBlocks
method returns.int
length()
Returns the length of this block.int
position()
Returns the position of the first instruction in this block.protected void
toString2
(StringBuilder sbuf) Methods inherited from class javassist.bytecode.stackmap.BasicBlock
find, toString
-
Field Details
-
clientData
A field that can be freely used for storing extra data. A client program of this control-flow analyzer can append an additional attribute to aBlock
object. The Javassist library never accesses this field. -
index
int index -
method
MethodInfo method -
entrances
ControlFlow.Block[] entrances
-
-
Constructor Details
-
Block
Block(int pos, MethodInfo minfo)
-
-
Method Details
-
toString2
- Overrides:
toString2
in classBasicBlock
-
getExit
BasicBlock[] getExit() -
index
public int index()Returns the position of this block in the array of basic blocks that thebasicBlocks
method returns.- See Also:
-
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
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
Returns the n-th block that may be executed after this block.- Parameters:
n
- an index in the array of exit blocks.
-
catchers
Returns catch clauses that will catch an exception thrown in this block.
-