|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.Location
public class Location
A class representing a location in the CFG for a method. Essentially, it represents a static instruction, with the important caveat that CFGs have inlined JSR subroutines, meaning that a single InstructionHandle in a CFG may represent several static locations. To this end, a Location is comprised of both an InstructionHandle and the BasicBlock that contains it.
Location objects may be compared with each other using the equals() method, and may be used as keys in tree and hash maps and sets. Note that it is only valid to compare Locations produced from the same CFG.
CFG
Constructor Summary | |
---|---|
Location(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(Location other)
|
boolean |
equals(java.lang.Object o)
|
BasicBlock |
getBasicBlock()
Get the basic block. |
static Location |
getFirstLocation(BasicBlock basicBlock)
|
org.apache.bcel.generic.InstructionHandle |
getHandle()
Get the instruction handle. |
static Location |
getLastLocation(BasicBlock basicBlock)
|
int |
hashCode()
|
boolean |
isFirstInstructionInBasicBlock()
Return whether or not the Location is positioned at the first instruction in the basic block. |
boolean |
isLastInstructionInBasicBlock()
Return whether or not the Location is positioned at the last instruction in the basic block. |
java.lang.String |
toCompactString()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Location(@NonNull org.apache.bcel.generic.InstructionHandle handle, @NonNull BasicBlock basicBlock)
handle
- the instructionbasicBlock
- the basic block containing the instructionMethod Detail |
---|
public static Location getFirstLocation(@NonNull BasicBlock basicBlock)
public static Location getLastLocation(@NonNull BasicBlock basicBlock)
public org.apache.bcel.generic.InstructionHandle getHandle()
public BasicBlock getBasicBlock()
public boolean isFirstInstructionInBasicBlock()
public boolean isLastInstructionInBasicBlock()
public int compareTo(Location other)
compareTo
in interface java.lang.Comparable<Location>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toCompactString()
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |