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

# Class ASTIdentifier

java.lang.Object
org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.ASTIdentifier

All Implemented Interfaces:
  `Cloneable`, `Node`, `Renderable`

public class ASTIdentifier extends SimpleNode
ASTIdentifier.java Method support for identifiers : $foo mainly used by ASTReference Introspection is now moved to 'just in time' or at render / execution time. There are many reasons why this has to be done, but the primary two are thread safety, to remove any context-derived information from class member variables.

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

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`strictRef`
Indicates if we are running in strict reference mode.
`protected Info`
`uberInfo`
This is really immutable after the init, so keep one for this node

### Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode

`children, column, first, firstImage, id, info, invalid, last, lastImage, line, literal, log, parent, parser, rsvc, state, template`

## Constructor Summary

Constructors
Constructor
Description
`ASTIdentifier(int id)`
`ASTIdentifier(Parser p, int id)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`execute(Object o, InternalContextAdapter context)`
`String`
`getIdentifier()`
Identifier getter
`Object`
`init(InternalContextAdapter context, Object data)`
simple init - don't do anything that is context specific.
`Object`
`jjtAccept(StandardParserVisitor visitor, Object data)`
`String`
`literal()`
Returns the string ".identifier".

### Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode

`childrenAccept, cleanupParserAndTokens, clone, clone, dump, dump, dump, evaluate, getColumn, getFirstToken, getFirstTokenImage, getInfo, getLastToken, getLastTokenImage, getLine, getLocation, getParser, getRuntimeServices, getTemplate, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, render, saveTokenImages, setFirstToken, setInfo, setInvalid, toString, toString, value`

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

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

## Field Details

### uberInfo

protected Info uberInfo
This is really immutable after the init, so keep one for this node

### strictRef

protected boolean strictRef
Indicates if we are running in strict reference mode.

## Constructor Details

### ASTIdentifier

public ASTIdentifier(int id)

Parameters:
  `id` -

### ASTIdentifier

public ASTIdentifier(Parser p, int id)

Parameters:
  `p` -
  `id` -

## Method Details

### getIdentifier

public String getIdentifier()
Identifier getter

Returns:
  identifier

### jjtAccept

public Object jjtAccept(StandardParserVisitor visitor, Object data)

Specified by:
  `jjtAccept` in interface `Node`
Overrides:
  `jjtAccept` in class `SimpleNode`
Parameters:
  `visitor` -
  `data` -
Returns:
  The Node execution result object.
See Also:
  - `SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.StandardParserVisitor, java.lang.Object)`

### init

public Object init(InternalContextAdapter context, Object data) throws TemplateInitException
simple init - don't do anything that is context specific. just get what we need from the AST, which is static.

Specified by:
  `init` in interface `Node`
Overrides:
  `init` in class `SimpleNode`
Parameters:
  `context` -
  `data` -
Returns:
  The data object.
Throws:
  `TemplateInitException`
See Also:
  - `Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)`

### execute

public Object execute(Object o, InternalContextAdapter context) throws MethodInvocationException

Specified by:
  `execute` in interface `Node`
Overrides:
  `execute` in class `SimpleNode`
Parameters:
  `o` -
  `context` -
Returns:
  The execution result.
Throws:
  `MethodInvocationException`
See Also:
  - `SimpleNode.execute(java.lang.Object, org.apache.velocity.context.InternalContextAdapter)`

### literal

public String literal()
Returns the string ".identifier". This method is only used for displaying the VTL stacktrace when a rendering error is encountered when runtime.log.track_location is true.

Specified by:
  `literal` in interface `Node`
Overrides:
  `literal` in class `SimpleNode`
Returns:
See Also:
  - `Node.literal()`