Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.visitor
Class NodeViewMode

    java.lang.Object
      |
      +--org.apache.velocity.runtime.visitor.BaseVisitor
            |
            +--org.apache.velocity.runtime.visitor.NodeViewMode

All Implemented Interfaces:
  ParserVisitor

public class NodeViewMode
extends BaseVisitor

This class is simply a visitor implementation that traverses the AST, produced by the Velocity parsing process, and creates a visual structure of the AST. This is primarily used for debugging, but it useful for documentation as well.

Version:
  $Id: NodeViewMode.java,v 1.5 2001/10/22 03:53:26 jon Exp $
Author:
  Jason van Zyl

Field Summary
`private int` | `indent`
`private boolean` | `showTokens`

Fields inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
`context, writer`

Constructor Summary
`NodeViewMode()`

Method Summary
`private java.lang.String` | `indentString()` Indent child nodes to help visually identify the structure of the AST.
`private java.lang.Object` | `showNode(Node node, java.lang.Object data)` Display the type of nodes and optionally the first token.
`java.lang.Object` | `visit(ASTAddNode node, java.lang.Object data)` Display an ASTAddNode ( + )
`java.lang.Object` | `visit(ASTAndNode node, java.lang.Object data)` Display an ASTAndNode ( && )
`java.lang.Object` | `visit(ASTAssignment node, java.lang.Object data)` Display an ASTAssignment node ( = )
`java.lang.Object` | `visit(ASTBlock node, java.lang.Object data)` Display an ASTBlock node
`java.lang.Object` | `visit(ASTDirective node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTDivNode node, java.lang.Object data)` Display an ASTDivNode ( / )
`java.lang.Object` | `visit(ASTElseIfStatement node, java.lang.Object data)` Display an ASTElseIfStatement node
`java.lang.Object` | `visit(ASTElseStatement node, java.lang.Object data)` Display an ASTElseStatement node
`java.lang.Object` | `visit(ASTEQNode node, java.lang.Object data)` Display an ASTEQNode ( == )
`java.lang.Object` | `visit(ASTExpression node, java.lang.Object data)` Display an ASTExpression node
`java.lang.Object` | `visit(ASTFalse node, java.lang.Object data)` Display an ASTFalse node
`java.lang.Object` | `visit(ASTGENode node, java.lang.Object data)` Display an ASTGENode ( >= )
`java.lang.Object` | `visit(ASTGTNode node, java.lang.Object data)` Display an ASTGTNode ( > )
`java.lang.Object` | `visit(ASTIdentifier node, java.lang.Object data)` Display an ASTIdentifier node
`java.lang.Object` | `visit(ASTIfStatement node, java.lang.Object data)` Display an ASTIfStatement node
`java.lang.Object` | `visit(ASTLENode node, java.lang.Object data)` Display an ASTLENode ( <= )
`java.lang.Object` | `visit(ASTLTNode node, java.lang.Object data)` Display an ASTLTNode ( < )
`java.lang.Object` | `visit(ASTMethod node, java.lang.Object data)` Display an ASTMethod node
`java.lang.Object` | `visit(ASTModNode node, java.lang.Object data)` Display an ASTModNode ( % )
`java.lang.Object` | `visit(ASTMulNode node, java.lang.Object data)` Display an ASTMulNode ( * )
`java.lang.Object` | `visit(ASTNENode node, java.lang.Object data)` Display an ASTNENode ( != )
`java.lang.Object` | `visit(ASTNotNode node, java.lang.Object data)` Display an ASTNotNode ( ! )
`java.lang.Object` | `visit(ASTNumberLiteral node, java.lang.Object data)` Display an ASTNumberLiteral node
`java.lang.Object` | `visit(ASTObjectArray node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTOrNode node, java.lang.Object data)` Display an ASTOrNode ( || )
`java.lang.Object` | `visit(ASTprocess node, java.lang.Object data)` Display an ASTprocess node
`java.lang.Object` | `visit(ASTReference node, java.lang.Object data)` Display an ASTReference node
`java.lang.Object` | `visit(ASTSetDirective node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTStringLiteral node, java.lang.Object data)` Display an ASTStringLiteral node
`java.lang.Object` | `visit(ASTSubtractNode node, java.lang.Object data)` Display an ASTSubtractNode ( - )
`java.lang.Object` | `visit(ASTText node, java.lang.Object data)` Display an ASTText node
`java.lang.Object` | `visit(ASTTrue node, java.lang.Object data)` Display an ASTTrue node
`java.lang.Object` | `visit(ASTWord node, java.lang.Object data)`
`java.lang.Object` | `visit(SimpleNode node, java.lang.Object data)` Display a SimpleNode

Methods inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
`setContext, setWriter, visit`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### indent

    private int indent

### showTokens

    private boolean showTokens

Constructor Detail

### NodeViewMode

    public NodeViewMode()

Method Detail

### indentString

    private java.lang.String indentString()

  Indent child nodes to help visually identify the structure of the AST.

### showNode

    private java.lang.Object showNode(Node node,
                                      java.lang.Object data)

  Display the type of nodes and optionally the first token.

### visit

    public java.lang.Object visit(SimpleNode node,
                                  java.lang.Object data)

  Display a SimpleNode
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTprocess node,
                                  java.lang.Object data)

  Display an ASTprocess node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTExpression node,
                                  java.lang.Object data)

  Display an ASTExpression node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTAssignment node,
                                  java.lang.Object data)

  Display an ASTAssignment node ( = )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTOrNode node,
                                  java.lang.Object data)

  Display an ASTOrNode ( || )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTAndNode node,
                                  java.lang.Object data)

  Display an ASTAndNode ( && )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTEQNode node,
                                  java.lang.Object data)

  Display an ASTEQNode ( == )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTNENode node,
                                  java.lang.Object data)

  Display an ASTNENode ( != )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTLTNode node,
                                  java.lang.Object data)

  Display an ASTLTNode ( < )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTGTNode node,
                                  java.lang.Object data)

  Display an ASTGTNode ( > )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTLENode node,
                                  java.lang.Object data)

  Display an ASTLENode ( <= )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTGENode node,
                                  java.lang.Object data)

  Display an ASTGENode ( >= )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTAddNode node,
                                  java.lang.Object data)

  Display an ASTAddNode ( + )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTSubtractNode node,
                                  java.lang.Object data)

  Display an ASTSubtractNode ( - )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTMulNode node,
                                  java.lang.Object data)

  Display an ASTMulNode ( * )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTDivNode node,
                                  java.lang.Object data)

  Display an ASTDivNode ( / )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTModNode node,
                                  java.lang.Object data)

  Display an ASTModNode ( % )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTNotNode node,
                                  java.lang.Object data)

  Display an ASTNotNode ( ! )
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTNumberLiteral node,
                                  java.lang.Object data)

  Display an ASTNumberLiteral node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTStringLiteral node,
                                  java.lang.Object data)

  Display an ASTStringLiteral node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTIdentifier node,
                                  java.lang.Object data)

  Display an ASTIdentifier node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTMethod node,
                                  java.lang.Object data)

  Display an ASTMethod node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTReference node,
                                  java.lang.Object data)

  Display an ASTReference node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTTrue node,
                                  java.lang.Object data)

  Display an ASTTrue node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTFalse node,
                                  java.lang.Object data)

  Display an ASTFalse node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTBlock node,
                                  java.lang.Object data)

  Display an ASTBlock node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTText node,
                                  java.lang.Object data)

  Display an ASTText node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTIfStatement node,
                                  java.lang.Object data)

  Display an ASTIfStatement node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTElseStatement node,
                                  java.lang.Object data)

  Display an ASTElseStatement node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTElseIfStatement node,
                                  java.lang.Object data)

  Display an ASTElseIfStatement node
  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTObjectArray node,
                                  java.lang.Object data)

  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTDirective node,
                                  java.lang.Object data)

  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTWord node,
                                  java.lang.Object data)

  Overrides:
    `visit` in class `BaseVisitor`

### visit

    public java.lang.Object visit(ASTSetDirective node,
                                  java.lang.Object data)

  Overrides:
    `visit` in class `BaseVisitor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Apache Software Foundation. All Rights Reserved.