org.apache.velocity.runtime.parser.node
Class ASTIdentifier
- Node
public class ASTIdentifier
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:
- Jason van Zyl
- Geir Magnusson Jr.
childrenAccept , dump , evaluate , execute , getColumn , getFirstToken , getInfo , getLastToken , getLine , getType , init , isInvalid , jjtAccept , jjtAddChild , jjtClose , jjtGetChild , jjtGetNumChildren , jjtGetParent , jjtOpen , jjtSetParent , literal , render , setFirstToken , setInfo , setInvalid , toString , value |
identifier
private String identifier
ASTIdentifier
public ASTIdentifier(int id)
ASTIdentifier
public ASTIdentifier(Parser p,
int id)
doIntrospection
private AbstractExecutor doIntrospection(Class data)
throws Exception
introspects the class to find the method name of the node,
or if that fails, treats the reference object as a map
and treats the identifier as a key in that map.
This needs work.
data
- Class to be introspected
init
public Object init(InternalContextAdapter context,
Object data)
throws Exception
simple init - don't do anything that is context specific.
just get what we need from the AST, which is static.
- init in interface Node
- init in interface SimpleNode
Copyright © 2003 Apache Software Foundation. All Rights Reserved.