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

Quick Search    Search Deep

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

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

public class CaseNode
extends DefaultNode

Implements the case part of the select..case statement.

Version:
0.9

Field Summary
(package private)  BlockNode exec
          Code to execute if one of the tests evaluate to true
(package private)  VarListNode tests
          List of tests for this case
 
Constructor Summary
CaseNode(VarListNode tests, BlockNode exec)
          Constructor to create a new case node.
 
Method Summary
 void dump()
          Dumps this case node.
 java.lang.Object execute(AspContext context)
          Executes this case node.
 boolean matches(java.lang.Object value, AspContext context)
          Checks if the test matches the case node.
 void prepare(AspContext context)
          Prepares this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tests

VarListNode tests
List of tests for this case


exec

BlockNode exec
Code to execute if one of the tests evaluate to true

Constructor Detail

CaseNode

public CaseNode(VarListNode tests,
                BlockNode exec)
Constructor to create a new case node.

Method Detail

dump

public void dump()
          throws AspException
Dumps this case node.

Specified by:
dump in interface Node
Overrides:
dump in class DefaultNode

matches

public boolean matches(java.lang.Object value,
                       AspContext context)
                throws AspException
Checks if the test matches the case node.


prepare

public void prepare(AspContext context)
             throws AspException
Prepares this node. Calls prepare on children nodes.

Specified by:
prepare in interface Node
Overrides:
prepare in class DefaultNode

execute

public java.lang.Object execute(AspContext context)
                         throws AspException
Executes this case node.

Specified by:
execute in interface Node
Overrides:
execute in class DefaultNode