Class NodeUtils
java.lang.Object
org.apache.velocity.runtime.parser.node.NodeUtils
Utilities for dealing with the AST node structure.
- Version:
- $Id: NodeUtils.java 687386 2008-08-20 16:57:07Z nbubna $
- Author:
- Jason van Zyl, Geir Magnusson Jr.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.commons.lang.text.StrBuilder
Collect all thes that are carried along with a token. static String
interpolate
(String argStr, Context vars) Deprecated.this method isn't called by any classstatic String
specialText
(Token t) Deprecated.use getSpecialText(Token t)static String
complete node literal
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
specialText
Deprecated.use getSpecialText(Token t) -
getSpecialText
Collect all thes that are carried along with a token. Special tokens do not participate in parsing but can still trigger certain lexical actions. In some cases you may want to retrieve these special tokens, this is simply a way to extract them. - Parameters:
t
- the Token- Returns:
- StrBuilder with the special tokens.
-
tokenLiteral
complete node literal- Parameters:
t
-- Returns:
- A node literal.
-
interpolate
Deprecated.this method isn't called by any classUtility method to interpolate context variables into string literals. So that the following will work: #set $name = "candy" $image.getURI("${name}.jpg") And the string literal argument will be transformed into "candy.jpg" before the method is executed.- Parameters:
argStr
-vars
-- Returns:
- Interpoliation result.
- Throws:
MethodInvocationException
-