com.pdmfc.tea.modules.tos
Class STosUtil
java.lang.Object
|
+--com.pdmfc.tea.modules.tos.STosUtil
- public class STosUtil
- extends java.lang.Object
This class implements some utility methods to be used by derived classes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_callbackName
public static final SObjSymbol _callbackName
- The name of variable with the missing function callback action.
STosUtil
public STosUtil()
getTosObj
public static STosObj getTosObj(java.lang.Object[] args,
int index)
throws STypeException
- Tries to cast one of the elements in the
args array
into an STosObj.
- Parameters:
args - Array of STObj that is tipically the array of
arguments passed to a Tea function.index - Index into the args array of the element to fetch.- Returns:
- The element at the
index position of the
args array. - Throws:
com.pdmfc.tea.runtime.STTypeException - Throw if the element at the index position of the
args array is not an STosObj.
getClass
public static STosClass getClass(SContext context,
java.lang.Object[] args,
int index)
throws STeaException
- Retrieves an STosClass object. This is referenced by
args[index], which is either the STosClass object we
are looking for or a symbol. In this later case there should be a variable
referenced by that symbol containing the STosClass.
- Parameters:
context - The context where we will look for a variable, if necessary.args - Array of STObj.index - An index into the args array.- Throws:
com.pdmfc.tea.modules.tos.STosNoSuchClassException - Thrown if the STosClass object could not be retrieved.
getClass
public static STosClass getClass(SContext context,
SObjSymbol className)
throws STeaException
- Fetches a class object.
- Parameters:
context - Context where the class will be searched and its constructor
invoked.className - Symbol identifying the class.
newInstance
public static STosObj newInstance(SObjSymbol className,
SContext context,
java.lang.Object[] constructorArgs)
throws STeaException
newInstance
public static STosObj newInstance(SObjSymbol className,
SContext context)
throws STeaException
© 2002 PDM&FC, All Rights Reserved.