org.apache.velocity.runtime.visitor

Class VMReferenceMungeVisitor

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,v 1.2.4.1 2004/03/03 23:23:03 geirm Exp $

Author: Geir Magnusson Jr.

Field Summary
Mapargmap
Map containing VM arg to instance-use reference Passed in with CTOR
Constructor Summary
VMReferenceMungeVisitor(Map map)
CTOR - takes a map of args to reference
Method Summary
Objectvisit(ASTReference node, Object data)
Visitor method - if the literal is right, will set the literal in the ASTReference node

Field Detail

argmap

private Map argmap
Map containing VM arg to instance-use reference Passed in with CTOR

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

Parameters: node ASTReference to work on data Object to pass down from caller

Copyright B) 2002 Apache Software Foundation. All Rights Reserved.