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.20 2001/10/22 03:53:25 jon 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, registerNatives, 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.
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 © 2003 Apache Software Foundation. All Rights Reserved.