Class ShrikeCFG.BasicBlock
java.lang.Object
com.ibm.wala.util.graph.impl.NodeWithNumber
com.ibm.wala.cfg.ShrikeCFG.BasicBlock
- All Implemented Interfaces:
IBasicBlock<IInstruction>
,INodeWithNumber
,Iterable<IInstruction>
- Enclosing class:
ShrikeCFG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Get the index of the first instruction in the basic block.int
Get the index of the last instruction in the basic block.int
Each basic block should have a unique number in its cfgint
hashCode()
boolean
Return true if the basic block represents a catch block.boolean
Return true if the basic block represents the unique entry block.boolean
Return true if the basic block represents the unique exit block.iterator()
toString()
Methods inherited from class com.ibm.wala.util.graph.impl.NodeWithNumber
getGraphNodeId, setGraphNodeId
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BasicBlock
public BasicBlock(int startIndex)
-
-
Method Details
-
isCatchBlock
public boolean isCatchBlock()Description copied from interface:IBasicBlock
Return true if the basic block represents a catch block.- Specified by:
isCatchBlock
in interfaceIBasicBlock<IInstruction>
- Returns:
- true if the basic block represents a catch block.
-
getLastInstructionIndex
public int getLastInstructionIndex()Description copied from interface:IBasicBlock
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
- Specified by:
getLastInstructionIndex
in interfaceIBasicBlock<IInstruction>
- Returns:
- the instruction index for the last instruction in the basic block
-
getFirstInstructionIndex
public int getFirstInstructionIndex()Description copied from interface:IBasicBlock
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
- Specified by:
getFirstInstructionIndex
in interfaceIBasicBlock<IInstruction>
- Returns:
- the instruction index for the first instruction in the basic block.
-
toString
-
isExitBlock
public boolean isExitBlock()Description copied from interface:IBasicBlock
Return true if the basic block represents the unique exit block.- Specified by:
isExitBlock
in interfaceIBasicBlock<IInstruction>
- Returns:
- true if the basic block represents the unique exit block.
-
isEntryBlock
public boolean isEntryBlock()Description copied from interface:IBasicBlock
Return true if the basic block represents the unique entry block.- Specified by:
isEntryBlock
in interfaceIBasicBlock<IInstruction>
- Returns:
- true if the basic block represents the unique entry block.
-
getMethod
- Specified by:
getMethod
in interfaceIBasicBlock<IInstruction>
- Returns:
- governing method for this block
-
hashCode
-
equals
-
getNumber
public int getNumber()Description copied from interface:IBasicBlock
Each basic block should have a unique number in its cfg- Specified by:
getNumber
in interfaceIBasicBlock<IInstruction>
- Returns:
- the basic block's number
-
iterator
- Specified by:
iterator
in interfaceIterable<IInstruction>
-