NodeUtils (Velocity 1.4 API)
Keywords: org.apache.velocity.runtime.parser.node.NodeUtils class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.parser.node
Class NodeUtils

    java.lang.Object
      org.apache.velocity.runtime.parser.node.NodeUtils

public class NodeUtils
extends java.lang.Object

Utilities for dealing with the AST node structure.

Version:
  $Id: NodeUtils.java,v 1.16.4.1 2004/03/03 23:22:59 geirm Exp $
Author:
  Jason van Zyl, Geir Magnusson Jr.

Constructor Summary
`NodeUtils()`

Method Summary
`static java.lang.String` | `interpolate(java.lang.String argStr, Context vars)` Utility method to interpolate context variables into string literals.
`static java.lang.String` | `specialText(Token t)` Collect all the s that are carried along with a token.
`static java.lang.String` | `tokenLiteral(Token t)` complete node literal

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NodeUtils

    public NodeUtils()

Method Detail

### specialText

    public static java.lang.String specialText(Token t)

  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.

### tokenLiteral

    public static java.lang.String tokenLiteral(Token t)

  complete node literal

### interpolate

    public static java.lang.String interpolate(java.lang.String argStr,
                                               Context vars)

  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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 Apache Software Foundation. All Rights Reserved.