|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.graph.AbstractVertex<Edge,BasicBlock>
edu.umd.cs.findbugs.ba.BasicBlock
public class BasicBlock
Simple basic block abstraction for BCEL.
CFG
Nested Class Summary | |
---|---|
class |
BasicBlock.InstructionIterator
A forward Iterator over the instructions of a basic block. |
private static class |
BasicBlock.InstructionReverseIterator
A reverse Iterator over the instructions in a basic block. |
Field Summary | |
---|---|
private org.apache.bcel.generic.CodeExceptionGen |
exceptionGen
|
private org.apache.bcel.generic.InstructionHandle |
exceptionThrower
|
private org.apache.bcel.generic.InstructionHandle |
firstInstruction
|
private org.apache.bcel.generic.InstructionHandle |
lastInstruction
|
private static java.util.BitSet |
nullCheckInstructionSet
Set of instruction opcodes that have an implicit null check. |
Fields inherited from interface edu.umd.cs.findbugs.ba.Debug |
---|
CHECK_ASSERTIONS, VERIFY_INTEGRITY |
Constructor Summary | |
---|---|
BasicBlock()
Constructor. |
Method Summary | |
---|---|
void |
addInstruction(org.apache.bcel.generic.InstructionHandle handle)
Add an InstructionHandle to the basic block. |
boolean |
containsInstruction(org.apache.bcel.generic.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. |
org.apache.bcel.generic.CodeExceptionGen |
getExceptionGen()
Get CodeExceptionGen object; returns null if this basic block is not the entry point of an exception handler. |
org.apache.bcel.generic.InstructionHandle |
getExceptionThrower()
Get the instruction for which this block is an exception thrower. |
org.apache.bcel.generic.InstructionHandle |
getFirstInstruction()
Get the first instruction in the basic block. |
int |
getId()
|
org.apache.bcel.generic.InstructionHandle |
getLastInstruction()
Get the last instruction in the basic block. |
org.apache.bcel.generic.InstructionHandle |
getPredecessorOf(org.apache.bcel.generic.InstructionHandle handle)
Get the predecessor of given instruction within the basic block. |
org.apache.bcel.generic.InstructionHandle |
getSuccessorOf(org.apache.bcel.generic.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. |
java.util.Iterator<org.apache.bcel.generic.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 |
isNullCheck()
Return whether or not this block is a null check. |
void |
setExceptionGen(org.apache.bcel.generic.CodeExceptionGen exceptionGen)
Set the CodeExceptionGen object. |
void |
setExceptionThrower(org.apache.bcel.generic.InstructionHandle exceptionThrower)
Set the instruction for which this block is the ETB. |
Methods inherited from class edu.umd.cs.findbugs.graph.AbstractVertex |
---|
compareTo, getLabel, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.BitSet nullCheckInstructionSet
private org.apache.bcel.generic.InstructionHandle firstInstruction
private org.apache.bcel.generic.InstructionHandle lastInstruction
private org.apache.bcel.generic.InstructionHandle exceptionThrower
private org.apache.bcel.generic.CodeExceptionGen exceptionGen
Constructor Detail |
---|
public BasicBlock()
Method Detail |
---|
public int getId()
public void setExceptionThrower(org.apache.bcel.generic.InstructionHandle exceptionThrower)
exceptionThrower
- the instructionpublic boolean isExceptionThrower()
public org.apache.bcel.generic.InstructionHandle getExceptionThrower()
public boolean isNullCheck()
public org.apache.bcel.generic.InstructionHandle getFirstInstruction()
public org.apache.bcel.generic.InstructionHandle getLastInstruction()
public org.apache.bcel.generic.InstructionHandle getSuccessorOf(org.apache.bcel.generic.InstructionHandle handle)
handle
- the instruction
public org.apache.bcel.generic.InstructionHandle getPredecessorOf(org.apache.bcel.generic.InstructionHandle handle)
handle
- the instruction
public void addInstruction(org.apache.bcel.generic.InstructionHandle handle)
handle
- the InstructionHandlepublic BasicBlock.InstructionIterator instructionIterator()
public java.util.Iterator<org.apache.bcel.generic.InstructionHandle> instructionReverseIterator()
public boolean isEmpty()
public boolean isExceptionHandler()
public org.apache.bcel.generic.CodeExceptionGen getExceptionGen()
public void setExceptionGen(org.apache.bcel.generic.CodeExceptionGen exceptionGen)
exceptionGen
- the CodeExceptionGen object for the blockpublic boolean containsInstruction(org.apache.bcel.generic.InstructionHandle handle)
handle
- the instruction
public boolean containsInstructionWithOffset(int offset)
offset
- the bytecode offset
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |