edu.neu.ccs.demeter.aplib
Interface ClassGraphI

All Known Implementing Classes:
ClassGraph

public interface ClassGraphI

A directed graph whose nodes are unique Objects with unique String labels and whose edges are EdgeI objects. For each node, the list of labels of construction edges going out of a node has no duplicates, and there are no duplicate alternation or inheritance edges. Calling .toString() on a node must return the label; these invariants must hold: getNode(String.valueOf(v)) == v String.valueOf(getNode(l)) == l (Note that a node is allowed to be null.) A node should also define .hashCode() and .equals() properly so that it may be used as a HashMap key.


Method Summary
 Collection getIncomingEdges(Object v)
          A List of edges (EdgeI objects) coming into node v.
 Object getNode(String l)
          The node labeled l in the class graph.
 Collection getNodes()
          A collection of nodes in the class graph.
 Collection getOutgoingEdges(Object v)
          A collection of edges (EdgeI objects) going out of node v.
 

Method Detail

getNodes

public Collection getNodes()
A collection of nodes in the class graph.


getNode

public Object getNode(String l)
               throws NoSuchClassGraphNodeException
The node labeled l in the class graph.

NoSuchClassGraphNodeException

getOutgoingEdges

public Collection getOutgoingEdges(Object v)
                            throws NoSuchClassGraphNodeException
A collection of edges (EdgeI objects) going out of node v. Return an empty collection if there are no outgoing edges.

NoSuchClassGraphNodeException

getIncomingEdges

public Collection getIncomingEdges(Object v)
                            throws NoSuchClassGraphNodeException
A List of edges (EdgeI objects) coming into node v. Return an empty list if there are no incoming edges.

NoSuchClassGraphNodeException