com.pdmfc.tea.modules.tos
Class STosMethod
java.lang.Object
|
+--com.pdmfc.tea.modules.tos.STosMethod
- All Implemented Interfaces:
- SObjFunction
- public class STosMethod
- extends java.lang.Object
- implements SObjFunction
This class implements a TOS method.
|
Method Summary |
java.lang.Object |
exec(SObjFunction func,
SContext context,
java.lang.Object[] args)
Executes the TOS method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STosMethod
public STosMethod(STosClass theClass,
SObjSymbol methodName,
SObjSymbol[] argNames,
SObjBlock body)
- Defines a method associated with the TOS class className.
- Parameters:
methodName - The name to associate with this TOS method.theClass - The TOS class where this TOS method is being defined.parameters - The names of the formal parameters.body - Block of code, representing the body of the method.
exec
public java.lang.Object exec(SObjFunction func,
SContext context,
java.lang.Object[] args)
throws STeaException
- Executes the TOS method. A new context is created, descending from
the context where the block was created. Local variables, named
after the formal command parameters are initialized with the values
received as arguments.
This method is supposed to be called with args having at least
one element.
- Specified by:
exec in interface SObjFunction
- Parameters:
context - The context where this command is being invoked.args - Array with the arguments passed to the command.- Throws:
STeaException - Thrown if there is not two arguments for the command.
© 2002 PDM&FC, All Rights Reserved.