net.sf.tomp.xtcl.command
Class Call

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.TryBlock
          extended by net.sf.tomp.xtcl.command.Call
All Implemented Interfaces:
Command

public class Call
extends TryBlock

Calls a Function. Passes parameters.

Author:
tomp

Field Summary
protected  java.lang.String name
          Name of the function to be called.
protected  java.lang.String[] passes
          Array of params passed to the function
 
Fields inherited from class net.sf.tomp.xtcl.command.TryBlock
command
 
Constructor Summary
Call()
           
 
Method Summary
 int execute(Context context)
          Calls a function
 void setName(java.lang.String p)
          set the function name
 void setPasses(java.lang.String[] r)
          set the passed params
 java.lang.String toString()
          returns textual representation: CALL func_name (param1, param2, ...)
 
Methods inherited from class net.sf.tomp.xtcl.command.TryBlock
setCommand
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Name of the function to be called.


passes

protected java.lang.String[] passes
Array of params passed to the function

Constructor Detail

Call

public Call()
Method Detail

setName

public void setName(java.lang.String p)
set the function name

Parameters:
p - function name

setPasses

public void setPasses(java.lang.String[] r)
set the passed params

Parameters:
r - array of passed params

execute

public int execute(Context context)
            throws java.lang.Exception
Calls a function

Specified by:
execute in interface Command
Overrides:
execute in class TryBlock
Parameters:
context - command is to be executed within Context
Returns:
call result
Throws:
java.lang.Exception - if something happens

toString

public java.lang.String toString()
returns textual representation: CALL func_name (param1, param2, ...)

Overrides:
toString in class TryBlock
Returns:
textual representation