org.apache.velocity.runtime.parser.node
Class ASTMethod
java.lang.Object
   org.apache.velocity.runtime.parser.node.SimpleNode
org.apache.velocity.runtime.parser.node.SimpleNode
       org.apache.velocity.runtime.parser.node.ASTMethod
org.apache.velocity.runtime.parser.node.ASTMethod
- All Implemented Interfaces: 
- Node
- public class ASTMethod 
- extends SimpleNode
ASTMethod.java
  Method support for references :  $foo.method()
  NOTE :
  introspection is now done at render time.
  Please look at the Parser.jjt file which is
  what controls the generation of this class.
- Version:
- $Id: ASTMethod.java 489650 2006-12-22 13:31:58Z cbrisson $
- Author:
- Jason van Zyl, Geir Magnusson Jr.
 
 
| Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode | 
| children, first, id, info, invalid, last, log, parent, parser, rsvc, state | 
 
 
 
| Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode | 
| childrenAccept, dump, evaluate, getColumn, getFirstToken, getInfo, getLastToken, getLine, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, render, setFirstToken, setInfo, setInvalid, toString, toString, value | 
 
 
uberInfo
protected Info uberInfo
ASTMethod
public ASTMethod(int id)
- Parameters:
- id-
ASTMethod
public ASTMethod(Parser p,
                 int id)
- Parameters:
- p-
- id-
jjtAccept
public Object jjtAccept(ParserVisitor visitor,
                        Object data)
- 
- Specified by:
- jjtAcceptin interface- Node
- Overrides:
- jjtAcceptin class- SimpleNode
 
- 
- Returns:
- The Node execution result object.
- See Also:
- SimpleNode.jjtAccept(org.apache.velocity.runtime.parser.ParserVisitor, java.lang.Object)
 
init
public Object init(InternalContextAdapter context,
                   Object data)
            throws TemplateInitException
- simple init - init our subtree and get what we can from
  the AST
 
- 
- Specified by:
- initin interface- Node
- Overrides:
- initin class- SimpleNode
 
- 
- Parameters:
- context-
- data-
- Returns:
- The init result
- Throws:
- TemplateInitException
- See Also:
- Node.init(org.apache.velocity.context.InternalContextAdapter, java.lang.Object)
 
execute
public Object execute(Object o,
                      InternalContextAdapter context)
               throws MethodInvocationException
- invokes the method.  Returns null if a problem, the
  actual return if the method returns something, or
  an empty string "" if the method returns void
 
- 
- Specified by:
- executein interface- Node
- Overrides:
- executein class- SimpleNode
 
- 
- Parameters:
- o-
- context-
- Returns:
- Result or null.
- Throws:
- MethodInvocationException
- See Also:
- Node.execute(java.lang.Object, org.apache.velocity.context.InternalContextAdapter)
 
getMethodName
public String getMethodName()
- 
- Returns:
- Returns the methodName.
 
Copyright © 2000-2007 The Apache Software Foundation. All Rights Reserved.