Package soot.toolkits.graph
Class DominatorTreeAdapter<N>
- java.lang.Object
-
- soot.toolkits.graph.DominatorTreeAdapter<N>
-
- Type Parameters:
N-
- All Implemented Interfaces:
Iterable<DominatorNode<N>>,DirectedGraph<DominatorNode<N>>
public class DominatorTreeAdapter<N> extends Object implements DirectedGraph<DominatorNode<N>>
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
-
-
Field Summary
Fields Modifier and Type Field Description protected DominatorTree<N>dt
-
Constructor Summary
Constructors Constructor Description DominatorTreeAdapter(DominatorTree<N> dt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DominatorNode<N>>getHeads()Returns a list of entry points for this graph.List<DominatorNode<N>>getPredsOf(DominatorNode<N> node)Returns a list of predecessors for the given node in the graph.List<DominatorNode<N>>getSuccsOf(DominatorNode<N> node)Returns a list of successors for the given node in the graph.List<DominatorNode<N>>getTails()Returns a list of exit points for this graph.Iterator<DominatorNode<N>>iterator()Returns an iterator for the nodes in this graph.intsize()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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
dt
protected DominatorTree<N> dt
-
-
Constructor Detail
-
DominatorTreeAdapter
public DominatorTreeAdapter(DominatorTree<N> dt)
-
-
Method Detail
-
getHeads
public List<DominatorNode<N>> getHeads()
Description copied from interface:DirectedGraphReturns a list of entry points for this graph.- Specified by:
getHeadsin interfaceDirectedGraph<N>
-
getTails
public List<DominatorNode<N>> getTails()
Description copied from interface:DirectedGraphReturns a list of exit points for this graph.- Specified by:
getTailsin interfaceDirectedGraph<N>
-
getPredsOf
public List<DominatorNode<N>> getPredsOf(DominatorNode<N> node)
Description copied from interface:DirectedGraphReturns a list of predecessors for the given node in the graph.- Specified by:
getPredsOfin interfaceDirectedGraph<N>
-
getSuccsOf
public List<DominatorNode<N>> getSuccsOf(DominatorNode<N> node)
Description copied from interface:DirectedGraphReturns a list of successors for the given node in the graph.- Specified by:
getSuccsOfin interfaceDirectedGraph<N>
-
iterator
public Iterator<DominatorNode<N>> iterator()
Description copied from interface:DirectedGraphReturns an iterator for the nodes in this graph. No specific ordering of the nodes is guaranteed.
-
size
public int size()
Description copied from interface:DirectedGraphReturns the node count for this graph.- Specified by:
sizein interfaceDirectedGraph<N>
-
-