public class Location extends java.lang.Object implements java.lang.Comparable<Location>
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 and Description |
|---|
Location(org.apache.bcel.generic.InstructionHandle handle,
BasicBlock basicBlock)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public Location(@NonNull org.apache.bcel.generic.InstructionHandle handle, @NonNull BasicBlock basicBlock)
handle - the instructionbasicBlock - the basic block containing the instructionpublic 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.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toCompactString()
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.