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

Quick Search    Search Deep

com.tripi.asp
Class ConditionalNode  view ConditionalNode download ConditionalNode.java

java.lang.Object
  extended bycom.tripi.asp.ConditionalNode
All Implemented Interfaces:
Node

public class ConditionalNode
extends java.lang.Object
implements Node

Implements a conditional node. IF .. THEN .. ELSE .. END IF

Version:
0.9

Field Summary
(package private)  Node condition
          Condition to test
(package private)  DebugContext context
          Context of this conditional node
private static org.apache.log4j.Category DBG
          Debugging category
(package private)  Node falseNode
          Code to evaluate if the condition is false, null if no code.
(package private)  Node trueNode
          Code to evaluate if the condition is true
 
Constructor Summary
ConditionalNode(java.lang.Object condition, java.lang.Object trueNode, java.lang.Object falseNode, DebugContext context)
          Conditional node constructor.
 
Method Summary
 void dump()
          Dumps the output of this conditional node.
 java.lang.Object execute(AspContext ctx)
          Executes this conditional node.
 Node getCondition()
          Gets the condition this node is based on.
 Node getFalseNode()
          Gets the false node, null for none
 Node getTrueNode()
          Gets the true node, null for none
 void prepare(AspContext context)
          Prepares the nodes for execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBG

private static org.apache.log4j.Category DBG
Debugging category


condition

Node condition
Condition to test


trueNode

Node trueNode
Code to evaluate if the condition is true


falseNode

Node falseNode
Code to evaluate if the condition is false, null if no code.


context

DebugContext context
Context of this conditional node

Constructor Detail

ConditionalNode

public ConditionalNode(java.lang.Object condition,
                       java.lang.Object trueNode,
                       java.lang.Object falseNode,
                       DebugContext context)
Conditional node constructor.

Method Detail

getCondition

public Node getCondition()
Gets the condition this node is based on.


getTrueNode

public Node getTrueNode()
Gets the true node, null for none


getFalseNode

public Node getFalseNode()
Gets the false node, null for none


dump

public void dump()
          throws AspException
Dumps the output of this conditional node.

Specified by:
dump in interface Node

prepare

public void prepare(AspContext context)
             throws AspException
Prepares the nodes for execution.

Specified by:
prepare in interface Node

execute

public java.lang.Object execute(AspContext ctx)
                         throws AspException
Executes this conditional node.

Specified by:
execute in interface Node