com.pdmfc.tea.runtime
Class SObjBlock
java.lang.Object
|
+--com.pdmfc.tea.runtime.SObjBlock
- public class SObjBlock
- extends java.lang.Object
This class represents a block of code. Associated with every block
is the context where it was created.
|
Method Summary |
java.lang.Object |
exec()
Executes the block in a new context which is an imediate descendent
of the context where the block was created. |
java.lang.Object |
exec(SContext aContext)
Executes the block in the context given as argument. |
SContext |
getContext()
The context where the block was created. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SObjBlock
public SObjBlock(SContext context,
SCode code)
- Initializes the block object.
- Parameters:
context - The context where the block is being created.code - List of statements that form the block of code.
getContext
public SContext getContext()
- The context where the block was created.
- Returns:
- A reference to the object refering to the context where the
block was created.
exec
public java.lang.Object exec(SContext aContext)
throws STeaException
- Executes the block in the context given as argument. New variables
are created inside that context.
- Parameters:
aContext - Context inside which the block will be executed.- Returns:
- The value returned by the last statement in the block.
- Throws:
STeaException - Thrown if something happened while
executing the statements that form the block.
exec
public java.lang.Object exec()
throws STeaException
- Executes the block in a new context which is an imediate descendent
of the context where the block was created.
- Returns:
- The value returned by the execution of last statement in
the block. Null if the block had no statements.
- Throws:
STeaException - Thrown if something happened while
executing the statements that form the block.
© 2002 PDM&FC, All Rights Reserved.