edu.uci.eecs.doc.cascade.graph
Class Vertex

java.lang.Object
  extended by edu.uci.eecs.doc.cascade.graph.Vertex
Direct Known Subclasses:
BasicBlock, Entry, Exit

public class Vertex
extends Object

Represents vertices in a control flow graph.

Author:
Trevor Harmon

Field Summary
protected  Graph graph
           
 
Constructor Summary
protected Vertex(Graph graph)
          Creates a new Vertex object.
 
Method Summary
protected  List<Vertex> asList()
          Due to type checking restrictions, the Arrays.asList(T...
 Graph getGraph()
          Returns the control flow graph to which this vertex belongs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graph

protected Graph graph
Constructor Detail

Vertex

protected Vertex(Graph graph)
Creates a new Vertex object.

Parameters:
graph - the control flow graph to which this vertex belongs
Method Detail

getGraph

public Graph getGraph()
Returns the control flow graph to which this vertex belongs.

Returns:
a control flow graph

asList

protected List<Vertex> asList()
Due to type checking restrictions, the Arrays.asList(T... a) method cannot be used in certain cases. For example, if B is a subclass of A, and a method takes a List<A> object as a parameter, you cannot create that list by calling Arrays.asList(b). (If you could, there is the possibility of inserting an object of type A into a list that claims to hold only type B objects. For more information, see this Developer Forums discussion.) This method works around that problem, allowing asList to be used indirectly.

Returns:
a one-element list containing this node
See Also:
Arrays.asList(Object[])