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, dump, 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, toStringpublic ASTStringLiteral(int id)
id - public ASTStringLiteral(Parser p, int id)
p - id - public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
init in interface Nodeinit in class SimpleNodecontext - data - TemplateInitExceptionNode.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)public String literal()
literal in interface Nodeliteral in class SimpleNodeNode.literal()public void adjTokenLineNums(Node node)
node - public static String unescape(String string)
string - public Object jjtAccept(ParserVisitor visitor, Object data)
jjtAccept in interface NodejjtAccept in class SimpleNodevisitor - data - SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor,
java.lang.Object)public boolean isConstant()
public Object value(InternalContextAdapter context)
value in interface Nodevalue in class SimpleNodecontext - Node.value(org.apache.velocity.context.InternalContextAdapter)public boolean evaluate(InternalContextAdapter context)
evaluate in interface Nodeevaluate in class SimpleNodeSimpleNode.evaluate(org.apache.velocity.context.InternalContextAdapter)Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.