harpoon.IR.Quads
Class Edge

java.lang.Object
  |
  +--harpoon.IR.Properties.CFGEdge
        |
        +--harpoon.IR.Quads.Edge
All Implemented Interfaces:
HCodeEdge, Serializable

public class Edge
extends CFGEdge
implements Serializable

Edge objects connect Quad nodes in the control-flow graph. The hashCode and equals methods of Edge have been implemented so that Edges can be used as hash table keys to associate analysis data with control-flow edges.

Version:
$Id: Edge.java,v 1.3 2002/02/26 22:45:56 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Field Summary
static ArrayFactory arrayFactory
          Array factory: returns new Edge[].
 
Method Summary
 boolean equals(Object obj)
          Compares two Edges for equality.
 CFGraphable fromCFG()
          Returns the source vertex of this Edge.
 int hashCode()
          Returns a hash code value for this object.
 CFGraphable toCFG()
          Returns the destination vertex of this Edge.
 String toString()
          Returns a human-readable representation of the Edge.
 int which_pred()
          Returns the predecessor index of this Edge in to.
 int which_succ()
          Returns the successor index of this Edge in from.
 
Methods inherited from class harpoon.IR.Properties.CFGEdge
from, to
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

arrayFactory

public static final ArrayFactory arrayFactory
Array factory: returns new Edge[].

Method Detail

fromCFG

public CFGraphable fromCFG()
Returns the source vertex of this Edge.

Specified by:
fromCFG in class CFGEdge

toCFG

public CFGraphable toCFG()
Returns the destination vertex of this Edge.

Specified by:
toCFG in class CFGEdge

which_pred

public int which_pred()
Returns the predecessor index of this Edge in to. this.to().prevEdge(this.which_pred()) == this.


which_succ

public int which_succ()
Returns the successor index of this Edge in from. this.from().nextEdge(this.which_succ()) == this.


equals

public boolean equals(Object obj)
Compares two Edges for equality.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object

toString

public String toString()
Returns a human-readable representation of the Edge.

Overrides:
toString in class Object