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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.tripi.asp.SubDefinitionNode
All Implemented Interfaces:
FunctionNode, Node

public class SubDefinitionNode
extends java.lang.Object
implements FunctionNode

SubDefinitionCode contains the parsed representation of a subroutine definition, also includes function definition syntax.


Field Summary
(package private)  BlockNode block
          Code within the function
(package private) static org.apache.log4j.Category DBG
          Debugging category
(package private)  IdentNode ident
          Name of the subroutine/function
(package private)  VarListNode identlist
          Parameter list to the function
(package private)  boolean isFunction
          true if this is a function, false otherwise
 
Constructor Summary
SubDefinitionNode(IdentNode ident, VarListNode identlist, BlockNode block, boolean isFunction)
          Constructor.
 
Method Summary
 void dump()
          Dumps the string representation of this subroutine definition.
 java.lang.Object execute(AspContext scope)
          Executes this subroutine, the subroutine definition itself has no effect when executed.
 java.lang.Object execute(VarListNode param, AspContext scope)
          This function executes the subroutine/function itself.
 BlockNode getBlock()
          Get the block of this subroutine.
 IdentNode getIdent()
          Get the identifier of this subroutine.
 VarListNode getIdentList()
          Get the list of parameters for this subroutine.
 boolean isFunction()
          Is this a function?
 void prepare(AspContext scope)
          Prepares this subroutine, it effectively defines this subroutine within the global scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBG

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


ident

IdentNode ident
Name of the subroutine/function


identlist

VarListNode identlist
Parameter list to the function


block

BlockNode block
Code within the function


isFunction

boolean isFunction
true if this is a function, false otherwise

Constructor Detail

SubDefinitionNode

public SubDefinitionNode(IdentNode ident,
                         VarListNode identlist,
                         BlockNode block,
                         boolean isFunction)
Constructor.

Method Detail

getIdent

public IdentNode getIdent()
Get the identifier of this subroutine.


getIdentList

public VarListNode getIdentList()
Get the list of parameters for this subroutine.


getBlock

public BlockNode getBlock()
Get the block of this subroutine.


isFunction

public boolean isFunction()
Is this a function?


dump

public void dump()
          throws AspException
Dumps the string representation of this subroutine definition.

Specified by:
dump in interface Node

prepare

public void prepare(AspContext scope)
             throws AspException
Prepares this subroutine, it effectively defines this subroutine within the global scope.

Specified by:
prepare in interface Node

execute

public java.lang.Object execute(AspContext scope)
                         throws AspException
Executes this subroutine, the subroutine definition itself has no effect when executed.

Specified by:
execute in interface Node

execute

public java.lang.Object execute(VarListNode param,
                                AspContext scope)
                         throws AspException
This function executes the subroutine/function itself.

Specified by:
execute in interface FunctionNode