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 463298 2006-10-12 16:10:32Z henning $
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, 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

Parameters:
map -
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
Returns:
A visitor object result.
See Also:
ParserVisitor.visit(org.apache.velocity.runtime.parser.node.ASTReference, java.lang.Object)


Copyright © 2000-2007 The Apache Software Foundation. All Rights Reserved.