org.apache.velocity.runtime.visitor
Class VMReferenceMungeVisitor

java.lang.Object
  extended by org.apache.velocity.runtime.visitor.BaseVisitor
      extended by org.apache.velocity.runtime.visitor.VMReferenceMungeVisitor
All Implemented Interfaces:
ParserVisitor

public class VMReferenceMungeVisitor
extends BaseVisitor

This class is a visitor used by the VM proxy to change the literal representation of a reference in a VM. The reason is to preserve the 'render literal if null' behavior w/o making the VMProxy stuff more complicated than it is already.

Version:
$Id: VMReferenceMungeVisitor.java 191743 2005-06-21 23:22:20Z dlr $
Author:
Geir Magnusson Jr.

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
context, writer
 
Constructor Summary
VMReferenceMungeVisitor(Map map)
          CTOR - takes a map of args to reference
 
Method Summary
 Object visit(ASTReference node, Object data)
          Visitor method - if the literal is right, will set the literal in the ASTReference node
 
Methods inherited from class org.apache.velocity.runtime.visitor.BaseVisitor
setContext, setWriter, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VMReferenceMungeVisitor

public VMReferenceMungeVisitor(Map map)
CTOR - takes a map of args to reference

Method Detail

visit

public Object visit(ASTReference node,
                    Object data)
Visitor method - if the literal is right, will set the literal in the ASTReference node

Specified by:
visit in interface ParserVisitor
Overrides:
visit in class BaseVisitor
Parameters:
node - ASTReference to work on
data - Object to pass down from caller


Copyright © 2002 Apache Software Foundation. All Rights Reserved.