soot.toolkits.graph
Class DominatorTreeAdapter

java.lang.Object
  extended by soot.toolkits.graph.DominatorTreeAdapter
All Implemented Interfaces:
Iterable, DirectedGraph

public class DominatorTreeAdapter
extends Object
implements DirectedGraph

This adapter provides a DirectedGraph interface to DominatorTree.

This might be useful if e.g. you want to apply a DirectedGraph analysis such as the PseudoTopologicalOrderer to a DominatorTree.

Author:
Navindra Umanee

Constructor Summary
DominatorTreeAdapter(DominatorTree dt)
           
 
Method Summary
 List getHeads()
          Returns a list of entry points for this graph.
 List getPredsOf(Object node)
          Returns a list of predecessors for the given node in the graph.
 List getSuccsOf(Object node)
          Returns a list of successors for the given node in the graph.
 List getTails()
          Returns a list of exit points for this graph.
 Iterator iterator()
          Returns an iterator for the nodes in this graph.
 int size()
          Returns the node count for this graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DominatorTreeAdapter

public DominatorTreeAdapter(DominatorTree dt)
Method Detail

getHeads

public List getHeads()
Description copied from interface: DirectedGraph
Returns a list of entry points for this graph.

Specified by:
getHeads in interface DirectedGraph

getTails

public List getTails()
Description copied from interface: DirectedGraph
Returns a list of exit points for this graph.

Specified by:
getTails in interface DirectedGraph

getPredsOf

public List getPredsOf(Object node)
Description copied from interface: DirectedGraph
Returns a list of predecessors for the given node in the graph.

Specified by:
getPredsOf in interface DirectedGraph

getSuccsOf

public List getSuccsOf(Object node)
Description copied from interface: DirectedGraph
Returns a list of successors for the given node in the graph.

Specified by:
getSuccsOf in interface DirectedGraph

iterator

public Iterator iterator()
Description copied from interface: DirectedGraph
Returns an iterator for the nodes in this graph. No specific ordering of the nodes is guaranteed.

Specified by:
iterator in interface Iterable
Specified by:
iterator in interface DirectedGraph

size

public int size()
Description copied from interface: DirectedGraph
Returns the node count for this graph.

Specified by:
size in interface DirectedGraph