C# Class NVelocity.Runtime.Parser.Node.ASTMethod

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.
Inheritance: NVelocity.Runtime.Parser.Node.SimpleNode
Show file Open project: rasmus-toftdahl-olesen/NVelocity Class Usage Examples

Public Methods

Method Description
ASTMethod ( Parser p, int id ) : System
ASTMethod ( int id ) : System
Accept ( IParserVisitor visitor, Object data ) : Object

Accept the visitor.

Execute ( Object o, IInternalContextAdapter context ) : Object

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 ( IInternalContextAdapter context, Object data ) : Object

simple init - init our subtree and get what we can from the AST

Private Methods

Method Description
BuildMethodArgs ( MethodInfo method, object parameters ) : object[]
BuildMethodArgs ( MethodInfo method, object parameters, int paramArrayIndex ) : object[]
EvalParameters ( object parameters, IInternalContextAdapter context ) : void
PerformIntrospection ( IInternalContextAdapter context, Type data, object parameters ) : Object

does the introspection of the class for the method needed. NOTE: this will try to flip the case of the first character for convince (compatibility with Java version). If there are no arguments, it will also try to find a property with the same name (also flipping first character).

Method Details

ASTMethod() public method

public ASTMethod ( Parser p, int id ) : System
p Parser
id int
return System

ASTMethod() public method

public ASTMethod ( int id ) : System
id int
return System

Accept() public method

Accept the visitor.
public Accept ( IParserVisitor visitor, Object data ) : Object
visitor IParserVisitor
data Object
return Object

Execute() public method

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
public Execute ( Object o, IInternalContextAdapter context ) : Object
o Object
context IInternalContextAdapter
return Object

Init() public method

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