public class Path
extends java.lang.Object
Constructor and Description |
---|
Path()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptVisitor(CFG cfg,
PathVisitor visitor)
Accept a PathVisitor.
|
void |
acceptVisitorStartingFromLocation(CFG cfg,
PathVisitor visitor,
BasicBlock startBlock,
org.apache.bcel.generic.InstructionHandle startHandle)
Accept a PathVisitor, starting from a given BasicBlock and
InstructionHandle.
|
void |
append(int id)
Append given BasicBlock id to the path.
|
void |
copyFrom(Path other)
Make this Path identical to the given one.
|
Path |
duplicate()
Return an exact copy of this Path.
|
boolean |
equals(java.lang.Object o) |
int |
getBlockIdAt(int index)
Get the BasicBlock id at the given index in the path.
|
int |
getLength()
Get the number of components (BasicBlock ids) in the Path.
|
boolean |
hasComponent(int blockId)
Determine whether or not the id of the given BasicBlock appears anywhere
in the path.
|
int |
hashCode() |
boolean |
isPrefixOf(Path path)
Determine whether or not given Path is a prefix of this one.
|
java.lang.String |
toString() |
public void append(int id)
id
- a BasicBlock id (label)public boolean hasComponent(int blockId)
blockId
- the id (label) of a BasicBlockpublic int getBlockIdAt(int index)
index
- an index in the Path (0 is the first component)public int getLength()
public Path duplicate()
public void copyFrom(Path other)
other
- a Path to which this object should be made identicalpublic void acceptVisitor(CFG cfg, PathVisitor visitor)
cfg
- the control flow graphvisitor
- a PathVisitorpublic void acceptVisitorStartingFromLocation(CFG cfg, PathVisitor visitor, BasicBlock startBlock, org.apache.bcel.generic.InstructionHandle startHandle)
cfg
- the control flow graphvisitor
- a PathVisitorstartBlock
- BasicBlock where traversal should startstartHandle
- InstructionHandle within the start block where traversal
should startpublic boolean isPrefixOf(Path path)
path
- another Pathpublic 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
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.