public final class CfgWalker
extends java.lang.Object
NOTE: Actions taken in the traversal process depend on the current status of the visitor (see
CfgVisitor.Status
). There are three possible statuses:
The status is checked after calling any visitor method. Once ABORT is set, all traversal methods return. If after a call to a method having the Begin suffix (e.g. onModuleBegin), the SKIP status is set (not ABORT and not OR), nested elements of the visited node (child nodes or subtrees) are not traversed and a corresponding terminating method (that has the End suffix) is called.
Constructor and Description |
---|
CfgWalker(CfgVisitor visitor)
The default constructor.
|
CfgWalker(CfgVisitor visitor,
CfgWalkerMode mode)
Constructs object with the specified visitor and mode.
|
Modifier and Type | Method and Description |
---|---|
void |
start(CfgModel model)
Starts control flow graph model walking.
|
void |
visit(java.lang.Iterable<CfgModelNode> nodes)
Visits a sequence of control flow graph model nodes.
|
void |
visitNode(CfgModelNode node)
Visits the specified node.
|
public CfgWalker(CfgVisitor visitor)
visitor
- visitor to be applied to control flow graph modeljava.lang.NullPointerException
- when argument is null
.public CfgWalker(CfgVisitor visitor, CfgWalkerMode mode)
visitor
- visitor to be applied to control flow graph modelmode
- visiting & walking modejava.lang.NullPointerException
- when any of the arguments is null
.public void start(CfgModel model)
model
- control flow graph modeljava.lang.NullPointerException
- when argument is null
.public void visit(java.lang.Iterable<CfgModelNode> nodes)
nodes
- a sequence of nodes to be visitedjava.lang.NullPointerException
- when argument is null
.public void visitNode(CfgModelNode node)
node
- node to be visitedjava.lang.NullPointerException
- when argument is null
.