public class ASTStringLiteral extends SimpleNode
Constructor and Description |
---|
ASTStringLiteral(int id) |
ASTStringLiteral(Parser p,
int id) |
Modifier and Type | Method and Description |
---|---|
void |
adjTokenLineNums(Node node)
Adjust all the line and column numbers that comprise a node so that they
are corrected for the string literals position within the template file.
|
boolean |
evaluate(InternalContextAdapter context) |
Object |
init(InternalContextAdapter context,
Object data)
init : we don't have to do much.
|
boolean |
isConstant()
Check to see if this is an interpolated string.
|
Object |
jjtAccept(ParserVisitor visitor,
Object data) |
String |
literal() |
static String |
unescape(String string) |
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.
|
childrenAccept, cleanupParserAndTokens, dump, execute, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString
public ASTStringLiteral(int id)
id
- public ASTStringLiteral(Parser p, int id)
p
- id
- public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
init
in interface Node
init
in class SimpleNode
context
- data
- TemplateInitException
Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
public String literal()
literal
in interface Node
literal
in class SimpleNode
Node.literal()
public void adjTokenLineNums(Node node)
public Object jjtAccept(ParserVisitor visitor, Object data)
jjtAccept
in interface Node
jjtAccept
in class SimpleNode
SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor,
java.lang.Object)
public boolean isConstant()
public Object value(InternalContextAdapter context)
value
in interface Node
value
in class SimpleNode
context
- Node.value(org.apache.velocity.context.InternalContextAdapter)
public boolean evaluate(InternalContextAdapter context)
evaluate
in interface Node
evaluate
in class SimpleNode
SimpleNode.evaluate(org.apache.velocity.context.InternalContextAdapter)
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.