Package com.ibm.wala.cfg
Interface IBasicBlock<InstType>
-
- All Superinterfaces:
INodeWithNumber,Iterable<InstType>
- All Known Subinterfaces:
IExplodedBasicBlock,ISSABasicBlock
- All Known Implementing Classes:
AstTranslator.PreBasicBlock,BasicBlockInContext,DexCFG.BasicBlock,InducedCFG.BasicBlock,ShrikeCFG.BasicBlock,SSACFG.BasicBlock,SSACFG.ExceptionHandlerBasicBlock
public interface IBasicBlock<InstType> extends INodeWithNumber, Iterable<InstType>
An interface for a basic block in a control flow graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetFirstInstructionIndex()Get the index of the first instruction in the basic block.intgetLastInstructionIndex()Get the index of the last instruction in the basic block.IMethodgetMethod()intgetNumber()Each basic block should have a unique number in its cfgbooleanisCatchBlock()Return true if the basic block represents a catch block.booleanisEntryBlock()Return true if the basic block represents the unique entry block.booleanisExitBlock()Return true if the basic block represents the unique exit block.-
Methods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getFirstInstructionIndex
int getFirstInstructionIndex()
Get the index of the first instruction in the basic block. The value is an index into the instruction array that contains all the instructions for the method. If the result is < 0, the block has no instructions- Returns:
- the instruction index for the first instruction in the basic block.
-
getLastInstructionIndex
int getLastInstructionIndex()
Get the index of the last instruction in the basic block. The value is an index into the instruction array that contains all the instructions for the method. If the result is < 0, the block has no instructions- Returns:
- the instruction index for the last instruction in the basic block
-
isCatchBlock
boolean isCatchBlock()
Return true if the basic block represents a catch block.- Returns:
- true if the basic block represents a catch block.
-
isExitBlock
boolean isExitBlock()
Return true if the basic block represents the unique exit block.- Returns:
- true if the basic block represents the unique exit block.
-
isEntryBlock
boolean isEntryBlock()
Return true if the basic block represents the unique entry block.- Returns:
- true if the basic block represents the unique entry block.
-
getMethod
IMethod getMethod()
- Returns:
- governing method for this block
-
getNumber
int getNumber()
Each basic block should have a unique number in its cfg- Returns:
- the basic block's number
-
-