com.alexmerz.simpleviz.visitor
Class NodeListVisitor

java.lang.Object
  extended by com.alexmerz.simpleviz.visitor.AbstractVisitor
      extended by com.alexmerz.simpleviz.visitor.NodeListVisitor
All Implemented Interfaces:
JJTParserVisitor

public class NodeListVisitor
extends AbstractVisitor

Implements a visitor class to process the syntax tree to fill the nodelist.

Version:
$Id$
Author:
Alexander Merz

Constructor Summary
NodeListVisitor(NodeList nl)
          Constructor
 
Method Summary
 java.lang.Object visit(ASTNodeAttribute nodeAttr, java.lang.Object data)
          Process a ASTNodeAttribute object.
 java.lang.Object visit(ASTNode node, java.lang.Object data)
          Process a NodeList object.
 java.lang.Object visit(ASTSubgraph node, java.lang.Object data)
          Process a ASTNodeAttribute object.
 
Methods inherited from class com.alexmerz.simpleviz.visitor.AbstractVisitor
visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeListVisitor

public NodeListVisitor(NodeList nl)
Constructor

Parameters:
nl - the NodeList to fill
Method Detail

visit

public java.lang.Object visit(ASTNode node,
                              java.lang.Object data)
Process a NodeList object. Adds a node the NodeList.

Specified by:
visit in interface JJTParserVisitor
Overrides:
visit in class AbstractVisitor
Parameters:
node - the NodeList object
data - unused

visit

public java.lang.Object visit(ASTNodeAttribute nodeAttr,
                              java.lang.Object data)
Process a ASTNodeAttribute object. Add node to NodeList including attributes.

Specified by:
visit in interface JJTParserVisitor
Overrides:
visit in class AbstractVisitor
Parameters:
nodeAttr - the ASTNodeAttribute object
data - unused

visit

public java.lang.Object visit(ASTSubgraph node,
                              java.lang.Object data)
Process a ASTNodeAttribute object. Add subgraph as Node with a special flag to NodeList.

Specified by:
visit in interface JJTParserVisitor
Overrides:
visit in class AbstractVisitor
Parameters:
node - the ASTSubgraph object
data - unused