org.apache.velocity.runtime.parser.node

Class ASTMethod

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,v 1.24.4.1 2004/03/03 23:22:59 geirm Exp $

Author: Jason van Zyl Geir Magnusson Jr.

Field Summary
StringmethodName
intparamCount
Constructor Summary
ASTMethod(int id)
ASTMethod(Parser p, int id)
Method Summary
Objectexecute(Object o, InternalContextAdapter context)
invokes the method.
Objectinit(InternalContextAdapter context, Object data)
simple init - init our subtree and get what we can from the AST
ObjectjjtAccept(ParserVisitor visitor, Object data)
Accept the visitor.

Field Detail

methodName

private String methodName

paramCount

private int paramCount

Constructor Detail

ASTMethod

public ASTMethod(int id)

ASTMethod

public ASTMethod(Parser p, int id)

Method Detail

execute

public Object execute(Object o, InternalContextAdapter context)
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

init

public Object init(InternalContextAdapter context, Object data)
simple init - init our subtree and get what we can from the AST

jjtAccept

public Object jjtAccept(ParserVisitor visitor, Object data)
Accept the visitor. *
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.