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)
@Nonnull public org.apache.bcel.generic.InstructionHandle getHandle()
@Nonnull 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™ is licenced under the LGPL. Copyright © 2006 University of Maryland.