org.apache.velocity.runtime.parser.node
Class ASTSetDirective
java.lang.Object
|
+--org.apache.velocity.runtime.parser.node.SimpleNode
|
+--org.apache.velocity.runtime.parser.node.ASTSetDirective
- All Implemented Interfaces:
- Node
- public class ASTSetDirective
- extends SimpleNode
Node for the #set directive
- Version:
- $Id: ASTSetDirective.java,v 1.14 2001/03/19 17:17:53 geirm Exp $
- Author:
- Jason van Zyl, Geir Magnusson Jr.
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode |
childrenAccept, dump, evaluate, execute, getColumn, getFirstToken, getInfo, getLastToken, getLine, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, setFirstToken, setInfo, setInvalid, toString, toString, value |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
right
private Node right
left
private ASTReference left
blather
boolean blather
ASTSetDirective
public ASTSetDirective(int id)
ASTSetDirective
public ASTSetDirective(Parser p,
int id)
jjtAccept
public java.lang.Object jjtAccept(ParserVisitor visitor,
java.lang.Object data)
- Accept the visitor.
- Overrides:
jjtAccept
in class SimpleNode
init
public java.lang.Object init(InternalContextAdapter context,
java.lang.Object data)
throws java.lang.Exception
- simple init. We can get the RHS and LHS as the the tree structure is static
- Overrides:
init
in class SimpleNode
render
public boolean render(InternalContextAdapter context,
java.io.Writer writer)
throws java.io.IOException,
MethodInvocationException
- puts the value of the RHS into the context under the key of the LHS
- Overrides:
render
in class SimpleNode
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
Copyright © 2001 Apache Software Foundation. All Rights Reserved.