org.apache.velocity.runtime.parser.node
Class ASTStringLiteral
java.lang.Object
|
+--org.apache.velocity.runtime.parser.node.SimpleNode
|
+--org.apache.velocity.runtime.parser.node.ASTStringLiteral
- All Implemented Interfaces:
- Node
- public class ASTStringLiteral
- extends SimpleNode
ASTStringLiteral support. Will interpolate!
- Version:
- $Id: ASTStringLiteral.java,v 1.16 2002/02/28 05:06:08 geirm Exp $
- Author:
- Geir Magnusson Jr., Jason van Zyl
Method Summary |
java.lang.Object |
init(InternalContextAdapter context,
java.lang.Object data)
init : we don't have to do much. |
java.lang.Object |
jjtAccept(ParserVisitor visitor,
java.lang.Object data)
Accept the visitor. |
java.lang.Object |
value(InternalContextAdapter context)
renders the value of the string literal
If the properties allow, and the string literal contains a $ or a #
the literal is rendered against the context
Otherwise, the stringlit is returned. |
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, render, setFirstToken, setInfo, setInvalid, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
interpolate
private boolean interpolate
nodeTree
private SimpleNode nodeTree
image
private java.lang.String image
interpolateimage
private java.lang.String interpolateimage
ASTStringLiteral
public ASTStringLiteral(int id)
ASTStringLiteral
public ASTStringLiteral(Parser p,
int id)
init
public java.lang.Object init(InternalContextAdapter context,
java.lang.Object data)
throws java.lang.Exception
- init : we don't have to do much. Init the tree (there
shouldn't be one) and then see if interpolation is turned on.
- Overrides:
init
in class SimpleNode
jjtAccept
public java.lang.Object jjtAccept(ParserVisitor visitor,
java.lang.Object data)
- Accept the visitor.
- Overrides:
jjtAccept
in class SimpleNode
value
public java.lang.Object value(InternalContextAdapter context)
- renders the value of the string literal
If the properties allow, and the string literal contains a $ or a #
the literal is rendered against the context
Otherwise, the stringlit is returned.
- Overrides:
value
in class SimpleNode
Copyright © 2003 Apache Software Foundation. All Rights Reserved.