| java.lang.Object org.apache.velocity.runtime.parser.node.NodeUtils
NodeUtils | public class NodeUtils (Code) | | Utilities for dealing with the AST node structure.
author: Jason van Zyl author: Geir Magnusson Jr. version: $Id: NodeUtils.java 463298 2006-10-12 16:10:32Z henning $ |
interpolate | public static String interpolate(String argStr, Context vars) throws MethodInvocationException(Code) | | Utility 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 - Parameters: vars - Interpoliation result. throws: MethodInvocationException - |
specialText | public static String specialText(Token t)(Code) | | Collect all the s 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 - String with the special tokens. |
tokenLiteral | public static String tokenLiteral(Token t)(Code) | | complete node literal
Parameters: t - A node literal. |
|
|