org.apache.velocity.runtime.parser.node
Class ASTSetDirective

java.lang.Object
  extended by org.apache.velocity.runtime.parser.node.SimpleNode
      extended by 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 191743 2005-06-21 23:22:20Z dlr $
Author:
Jason van Zyl, Geir Magnusson Jr.

Field Summary
 
Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
children, first, id, info, invalid, last, parent, parser, rsvc, state
 
Constructor Summary
ASTSetDirective(int id)
           
ASTSetDirective(Parser p, int id)
           
 
Method Summary
 Object init(InternalContextAdapter context, Object data)
          simple init.
 Object jjtAccept(ParserVisitor visitor, Object data)
          Accept the visitor.
 boolean render(InternalContextAdapter context, Writer writer)
          puts the value of the RHS into the context under the key of the LHS
 
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
childrenAccept, dump, evaluate, execute, getColumn, getFirstToken, getInfo, getLastToken, getLine, getLocation, getLocation, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, setFirstToken, setInfo, setInvalid, toString, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTSetDirective

public ASTSetDirective(int id)

ASTSetDirective

public ASTSetDirective(Parser p,
                       int id)
Method Detail

jjtAccept

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

Specified by:
jjtAccept in interface Node
Overrides:
jjtAccept in class SimpleNode

init

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

Specified by:
init in interface Node
Overrides:
init in class SimpleNode
Throws:
Exception

render

public boolean render(InternalContextAdapter context,
                      Writer writer)
               throws MethodInvocationException
puts the value of the RHS into the context under the key of the LHS

Specified by:
render in interface Node
Overrides:
render in class SimpleNode
Throws:
MethodInvocationException


Copyright © 2002 Apache Software Foundation. All Rights Reserved.