Package org.apache.velocity.runtime.parser.node

# Class NodeUtils

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

public class NodeUtils extends Object
Utilities for dealing with the AST node structure.

Version:
  $Id$
Author:
  Jason van Zyl, Geir Magnusson Jr.

## Constructor Summary

Constructors
Constructor
Description
`NodeUtils()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`fixIndentation(SimpleNode parent, String parentIndentation)`
Fix children indentation in structured space gobbling mode.
`static StringBuilder`
`getSpecialText(Parser parser, Token t)`
Collect all the <SPECIAL_TOKEN>s that are carried along with a token.
`static String`
`tokenLiteral(Parser parser, Token t)`
complete node literal

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### NodeUtils

public NodeUtils()

## Method Details

### getSpecialText

public static StringBuilder getSpecialText(Parser parser, Token t)
Collect all the <SPECIAL_TOKEN>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` - the Token
Returns:
  StrBuilder with the special tokens.
Since:
  2.0.0

### tokenLiteral

public static String tokenLiteral(Parser parser, Token t)
complete node literal

Parameters:
  `t` -
Returns:
  A node literal.

### fixIndentation

public static void fixIndentation(SimpleNode parent, String parentIndentation)
Fix children indentation in structured space gobbling mode.

Parameters:
  `parent` -
  `parentIndentation` -