edu.umd.cs.findbugs.ba
public class BasicBlock extends AbstractVertex<Edge,BasicBlock> implements Debug
See Also: CFG
Nested Class Summary | |
---|---|
class | BasicBlock.InstructionIterator
A forward Iterator over the instructions of a basic block.
|
Constructor Summary | |
---|---|
BasicBlock()
Constructor. |
Method Summary | |
---|---|
void | addInstruction(InstructionHandle handle)
Add an InstructionHandle to the basic block.
|
boolean | containsInstruction(InstructionHandle handle)
Return whether or not the basic block contains the given instruction.
|
boolean | containsInstructionWithOffset(int offset)
Return whether or not the basic block contains the instruction
with the given bytecode offset.
|
CodeExceptionGen | getExceptionGen()
Get CodeExceptionGen object; returns null if this basic block is
not the entry point of an exception handler.
|
InstructionHandle | getExceptionThrower()
Get the instruction for which this block is an exception thrower.
|
InstructionHandle | getFirstInstruction()
Get the first instruction in the basic block. |
int | getId() |
InstructionHandle | getLastInstruction()
Get the last instruction in the basic block. |
InstructionHandle | getPredecessorOf(InstructionHandle handle)
Get the predecessor of given instruction within the basic block. |
InstructionHandle | getSuccessorOf(InstructionHandle handle)
Get the successor of given instruction within the basic block. |
BasicBlock.InstructionIterator | instructionIterator()
Get an Iterator over the instructions in the basic block. |
Iterator<InstructionHandle> | instructionReverseIterator()
Get an Iterator over the instructions in the basic block in reverse order.
|
boolean | isEmpty()
Return true if there are no Instructions in this basic block. |
boolean | isExceptionHandler()
Is this block an exception handler? |
boolean | isExceptionThrower()
Return whether or not this block is an exception thrower. |
boolean | isInJSRSubroutine() |
boolean | isNullCheck()
Return whether or not this block is a null check. |
void | setExceptionGen(CodeExceptionGen exceptionGen)
Set the CodeExceptionGen object. |
void | setExceptionThrower(InstructionHandle exceptionThrower)
Set the instruction for which this block is the ETB.
|
Parameters: handle the InstructionHandle
Parameters: handle the instruction
Returns: true if the block contains the instruction, false otherwise
Parameters: offset the bytecode offset
Returns: true if the block contains an instruction with the given offset, false if it does not
Returns: the CodeExceptionGen object, or null
Returns: the instruction, or null if this block is not an exception thrower
Parameters: handle the instruction
Returns: the instruction's predecessor, or null if the instruction is the first in the basic block
Parameters: handle the instruction
Returns: the instruction's successor, or null if the instruction is the last in the basic block
Parameters: exceptionGen the CodeExceptionGen object for the block
Parameters: exceptionThrower the instruction