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

This class is responsible for handling the references in VTL ($foo). Please look at the Parser.jjt file which is what controls the generation of this class.
Inheritance: NVelocity.Runtime.Parser.Node.SimpleNode
Exibir arquivo Open project: nats/castle-1.0.3-mono Class Usage Examples

Private Properties

Property Type Description

Public Methods

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

Accept the visitor.

Evaluate ( IInternalContextAdapter context ) : bool

Computes boolean value of this reference Returns the actual value of reference return type boolean, and 'true' if value is not null

Execute ( Object o, IInternalContextAdapter context ) : Object

gets an Object that 'is' the value of the reference

GetVariableValue ( IContext context, String variable ) : Object
Init ( IInternalContextAdapter context, Object data ) : Object
Render ( IInternalContextAdapter context, TextWriter writer ) : bool

gets the value of the reference and outputs it to the writer.

SetLiteral ( String value ) : void
SetValue ( IInternalContextAdapter context, Object value ) : bool

Sets the value of a complex reference (something like $foo.bar) Currently used by ASTSetReference()

Value ( IInternalContextAdapter context ) : Object

Method Details

ASTReference() public method

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

ASTReference() public method

public ASTReference ( 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

Evaluate() public method

Computes boolean value of this reference Returns the actual value of reference return type boolean, and 'true' if value is not null
public Evaluate ( IInternalContextAdapter context ) : bool
context IInternalContextAdapter context to compute value with
return bool

Execute() public method

gets an Object that 'is' the value of the reference
public Execute ( Object o, IInternalContextAdapter context ) : Object
o Object
context IInternalContextAdapter
return Object

GetVariableValue() public method

public GetVariableValue ( IContext context, String variable ) : Object
context IContext
variable String
return Object

Init() public method

public Init ( IInternalContextAdapter context, Object data ) : Object
context IInternalContextAdapter
data Object
return Object

Render() public method

gets the value of the reference and outputs it to the writer.
public Render ( IInternalContextAdapter context, TextWriter writer ) : bool
context IInternalContextAdapter context of data to use in getting value
writer System.IO.TextWriter writer to render to
return bool

SetLiteral() public method

public SetLiteral ( String value ) : void
value String
return void

SetValue() public method

Sets the value of a complex reference (something like $foo.bar) Currently used by ASTSetReference()
public SetValue ( IInternalContextAdapter context, Object value ) : bool
context IInternalContextAdapter context object containing this reference
value Object Object to set as value
return bool

Value() public method

public Value ( IInternalContextAdapter context ) : Object
context IInternalContextAdapter
return Object