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,v 1.22.4.1 2004/03/03 23:22:59 geirm Exp $
Author:
Jason van Zyl, Geir Magnusson Jr.

Field Summary
(package private)  boolean blather
           
private  ASTReference left
           
private  java.lang.String leftReference
           
private  Node right
           
 
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
private  ASTReference getLeftHandSide()
          returns the ASTReference that is the LHS of the set statememt
private  Node getRightHandSide()
          returns the RHS Node of the set statement
 java.lang.Object init(InternalContextAdapter context, java.lang.Object data)
          simple init.
 java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 boolean render(InternalContextAdapter context, java.io.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, 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
 

Field Detail

leftReference

private java.lang.String leftReference

right

private Node right

left

private ASTReference left

blather

boolean blather
Constructor Detail

ASTSetDirective

public ASTSetDirective(int id)

ASTSetDirective

public ASTSetDirective(Parser p,
                       int id)
Method Detail

jjtAccept

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

Specified by:
jjtAccept in interface Node
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

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

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

Specified by:
render in interface Node
Overrides:
render in class SimpleNode
Throws:
java.io.IOException
MethodInvocationException

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 ? 2002 Apache Software Foundation. All Rights Reserved.