Class ASTIdentifier
- java.lang.Object
-
- org.apache.velocity.runtime.parser.node.SimpleNode
-
- org.apache.velocity.runtime.parser.node.ASTIdentifier
-
- All Implemented Interfaces:
Node
,Renderable
public class ASTIdentifier extends SimpleNode
ASTIdentifier.java Method support for identifiers : $foo mainly used by ASTRefrence 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: ASTIdentifier.java 732250 2009-01-07 07:37:10Z byron $
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
identifier
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
-
Constructor Summary
Constructors Constructor Description ASTIdentifier(int id)
ASTIdentifier(Parser p, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execute(java.lang.Object o, InternalContextAdapter context)
java.lang.Object
init(InternalContextAdapter context, java.lang.Object data)
simple init - don't do anything that is context specific.java.lang.Object
jjtAccept(ParserVisitor visitor, java.lang.Object data)
-
Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
childrenAccept, dump, evaluate, getColumn, getFirstToken, getInfo, getLastToken, getLine, getLocation, getRuntimeServices, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, render, setFirstToken, setInfo, setInvalid, toString, toString, value
-
-
-
-
Field Detail
-
identifier
private java.lang.String identifier
-
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 Detail
-
ASTIdentifier
public ASTIdentifier(int id)
- Parameters:
id
-
-
ASTIdentifier
public ASTIdentifier(Parser p, int id)
- Parameters:
p
-id
-
-
-
Method Detail
-
jjtAccept
public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
- Specified by:
jjtAccept
in interfaceNode
- Overrides:
jjtAccept
in classSimpleNode
- Returns:
- The Node execution result object.
- See Also:
SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor, java.lang.Object)
-
init
public java.lang.Object init(InternalContextAdapter context, java.lang.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 interfaceNode
- Overrides:
init
in classSimpleNode
- Parameters:
context
-data
-- Returns:
- The data object.
- Throws:
TemplateInitException
- See Also:
Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
-
execute
public java.lang.Object execute(java.lang.Object o, InternalContextAdapter context) throws MethodInvocationException
- Specified by:
execute
in interfaceNode
- Overrides:
execute
in classSimpleNode
- Returns:
- The execution result.
- Throws:
MethodInvocationException
- See Also:
SimpleNode.execute(java.lang.Object, org.apache.velocity.context.InternalContextAdapter)
-
-