com.pdmfc.tea.modules.tos
Class SMethodLoader
java.lang.Object
com.pdmfc.tea.modules.tos.SMethodLoader
- All Implemented Interfaces:
- SObjFunction
public class SMethodLoader
- extends java.lang.Object
- implements SObjFunction
This class implements a TOS method that when invoked for the first
time loads and creates an instance of another class. That instance
will then replace the TOS method that had just been invoked. The
loaded class must be derived from SObjFunction and it must
represent a TOS method for the same TOS class the
SMethodLoader had been a method of.
|
Method Summary |
java.lang.Object |
exec(SObjFunction obj,
SContext context,
java.lang.Object[] args)
This method is supposed to be called with args having at
least one element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMethodLoader
public SMethodLoader(java.lang.String className)
- Parameters:
className - The name of the class to load the first time the exec()
method is invoked.
exec
public java.lang.Object exec(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws STeaException
- This method is supposed to be called with args having at
least one element.
Argument obj is supposed to be an
STosObj. Argument args[1] is supposed to be a
symbol naming the called method. The method named after
args[1] of the class of the obj TOS object is
replaced by an instance of the classe whose name was passed to the
constructor.
- Specified by:
exec in interface SObjFunction
- Parameters:
obj - The SObjProc that led to execute this method.context - The intepreter context where the Tea function was called.args - The arguments the function was called with.
- Returns:
- An Object object.
- Throws:
STeaException - Thrown if there were problems instantianting the new
SObjProc or while invoking the exec() method
for that object.
© 2009 PDM&FC, All Rights Reserved.