Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tripi.asp
Interface Node  view Node download Node.java

All Known Subinterfaces:
FunctionNode, MapNode, ObjectNode
All Known Implementing Classes:
AbstractFunctionNode, ArithmeticNode, ArrayNode, BlockNode, ConditionalNode, DefaultNode, DoNode, ForEachNode, ForNode, FunctionCallNode, HTMLNode, JavaObjectNode, JavaObjectNode.JavaFieldNode, NothingNode, PackedByteArrayNode, PackedCharArrayNode, SelectNode, SetValueNode, SubDefinitionNode

public interface Node

This is the base interface for all internal ASP objects. Implemented statements:

Version:
0.9

Method Summary
 void dump()
          Dumps the node representation in ASP textual format.
 java.lang.Object execute(AspContext context)
          Executes this node in the defined context.
 void prepare(AspContext context)
          Prepares the code for execution.
 

Method Detail

dump

public void dump()
          throws AspException
Dumps the node representation in ASP textual format. This function is primarily used for debugging, but it is recommended that the node dump itself in a format which could be re-parsed as valid code. Whitespace need not be preserved.


prepare

public void prepare(AspContext context)
             throws AspException
Prepares the code for execution. This includes defining global functions and subroutines, setting global variables, and any other preprocessing required. This procedure should be called before execute(AspContext). As part of the preparation, it should call prepare() on any child nodes it may use during execution.


execute

public java.lang.Object execute(AspContext context)
                         throws AspException
Executes this node in the defined context. This function should return a valid Node or base type as a return value. It can return one of the Exit... objects to signal the Asp server to exit the block, loop, etc. Except in special cases, prepare(AspContext) should be called before execute(AspContext)