org.apache.velocity.runtime.parser.node

Class ASTSetDirective

public class ASTSetDirective extends SimpleNode

Node for the #set directive

Version: $Id: ASTSetDirective.java,v 1.22.4.1 2004/03/03 23:22:59 geirm Exp $

Author: Jason van Zyl Geir Magnusson Jr.

Field Summary
booleanblather
ASTReferenceleft
StringleftReference
Noderight
Constructor Summary
ASTSetDirective(int id)
ASTSetDirective(Parser p, int id)
Method Summary
ASTReferencegetLeftHandSide()
returns the ASTReference that is the LHS of the set statememt
NodegetRightHandSide()
returns the RHS Node of the set statement
Objectinit(InternalContextAdapter context, Object data)
simple init.
ObjectjjtAccept(ParserVisitor visitor, Object data)
Accept the visitor.
booleanrender(InternalContextAdapter context, Writer writer)
puts the value of the RHS into the context under the key of the LHS

Field Detail

blather

boolean blather

left

private ASTReference left

leftReference

private String leftReference

right

private Node right

Constructor Detail

ASTSetDirective

public ASTSetDirective(int id)

ASTSetDirective

public ASTSetDirective(Parser p, int id)

Method Detail

getLeftHandSide

private ASTReference getLeftHandSide()
returns the ASTReference that is the LHS of the set statememt

getRightHandSide

private Node getRightHandSide()
returns the RHS Node of the set statement

init

public Object init(InternalContextAdapter context, Object data)
simple init. We can get the RHS and LHS as the the tree structure is static

jjtAccept

public Object jjtAccept(ParserVisitor visitor, Object data)
Accept the visitor. *

render

public boolean render(InternalContextAdapter context, Writer writer)
puts the value of the RHS into the context under the key of the LHS
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.