org.jtool.jxplatform.graph.cfg
Class GetPostDominator

java.lang.Object
  extended byorg.jtool.jxplatform.graph.cfg.GetPostDominator

public class GetPostDominator
extends java.lang.Object

Calculates post dominators on a CFG.

Author:
Katsuhsa Maruyama

Constructor Summary
GetPostDominator(CFG cfg, CFGNode anchor)
          Calculates post-dominators nodes for a node on a CFG.
 
Method Summary
 boolean add(CFGNode node)
          Appends a CFG node to the post-dominators.
 boolean contains(CFGNode node)
          Tests if the collection of the post-dominators contains a node.
 boolean isEmpty()
          Tests if there is no post-dominator.
 java.util.Iterator iterator()
          Returns an iterator of the collection of the post-dominators in proper sequence.
 void printNodes()
          Displays information about the collected nodes for debugging.
 boolean remove(CFGNode node)
          Removes a CFG node from the post-dominators.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetPostDominator

public GetPostDominator(CFG cfg,
                        CFGNode anchor)
Calculates post-dominators nodes for a node on a CFG.

Parameters:
cfg - A CFG.
anchor - A CFG node.
Method Detail

add

public boolean add(CFGNode node)
Appends a CFG node to the post-dominators.

Parameters:
node - A CFG node to be append.
Returns:
true if the post-dominators changed as a result of the call.

remove

public boolean remove(CFGNode node)
Removes a CFG node from the post-dominators.

Parameters:
node - A CFG node to be removed.
Returns:
true if the post-dominators changed as a result of the call.

contains

public boolean contains(CFGNode node)
Tests if the collection of the post-dominators contains a node.

Parameters:
node - A CFG node to be tested.
Returns:
true if the post-dominators contains the specified node, otherwise false.

isEmpty

public boolean isEmpty()
Tests if there is no post-dominator.

Returns:
true if there is no post-dominator, otherwise false.

iterator

public java.util.Iterator iterator()
Returns an iterator of the collection of the post-dominators in proper sequence.

Returns:
The iterator of the collection of the post-dominators.

printNodes

public void printNodes()
Displays information about the collected nodes for debugging.