org.apache.velocity.test.view

Class TemplateNodeView

public class TemplateNodeView extends Object

Simple class for dumping the AST for a template. Good for debugging and writing new directives.
Field Summary
SimpleNodedocument
Root of the AST node structure that results from parsing a template.
NodeViewModevisitor
Visitor used to traverse the AST node structure and produce a visual representation of the node structure.
Constructor Summary
TemplateNodeView(String template)
Default constructor: sets up the Velocity Runtime, creates the visitor for traversing the node structure and then produces the visual representation by the visitation.
Method Summary
static voidmain(String[] args)
For testing

Field Detail

document

private SimpleNode document
Root of the AST node structure that results from parsing a template.

visitor

private NodeViewMode visitor
Visitor used to traverse the AST node structure and produce a visual representation of the node structure. Very good for debugging and writing new directives.

Constructor Detail

TemplateNodeView

public TemplateNodeView(String template)
Default constructor: sets up the Velocity Runtime, creates the visitor for traversing the node structure and then produces the visual representation by the visitation.

Method Detail

main

public static void main(String[] args)
For testing
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.