|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.problets.domain.model.DomainModel
org.problets.domain.model.control.ControlModel
org.problets.domain.model.control.abstraction.Scope
public abstract class Scope
Models a scope object. Serves as the base class for Statement, StatementSequence, Block, Function and Program
| Field Summary | |
|---|---|
static int |
IDENTITY
The identity of this class |
static java.lang.String |
MISPLACED_BREAK
Error corresponding to misplaced break statement |
static java.lang.String |
MISPLACED_CONTINUE
Error corresponding to misplaced continue statement |
| Fields inherited from class org.problets.domain.model.control.ControlModel |
|---|
ABORT_EXECUTION, BREAK_EXECUTION, CONTINUE_EXECUTION, END_EXECUTION, INFINITE_EXECUTION, RETURN_EXECUTION, RUN_TIME_ERROR_EXECUTION, SKIP_EXECUTION |
| Constructor Summary | |
|---|---|
Scope(ActivationRecord parentActivationRecord,
HeapModel heap,
java.lang.String inTemplate)
Constructs a Scope object |
|
| Method Summary | |
|---|---|
ActivationRecord |
getActivationRecord()
|
static java.lang.String |
getParameterCode(java.lang.String template,
ActivationRecord activationRecord)
Returns the code the actual parameters in a function call |
java.lang.String[] |
getPossibleErrors()
Method to return errors for scope objects May want to post-process based on Student Model |
static void |
main(java.lang.String[] args)
|
ExecutionStatus |
newFunctionCall(RunEnv runEnv,
Behavior behavior,
java.lang.String statement,
int codeLineNumber,
boolean stepFlag)
Calls the function and adds its explanation, output and errors to the respective vectors. |
| Methods inherited from class org.problets.domain.model.control.ControlModel |
|---|
explainProcess, getCode, getCodeLength, getName, getStartLineNumber |
| Methods inherited from class org.problets.domain.model.DomainModel |
|---|
clone, getId, getIdName, grade |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IDENTITY
public static final java.lang.String MISPLACED_BREAK
public static final java.lang.String MISPLACED_CONTINUE
| Constructor Detail |
|---|
public Scope(ActivationRecord parentActivationRecord,
HeapModel heap,
java.lang.String inTemplate)
parentActivationRecord - ActivationRecord of the parentheap - HeapModel that can be accessed by this scope objectinTemplate - String representing the template for this scope object| Method Detail |
|---|
public ActivationRecord getActivationRecord()
public java.lang.String[] getPossibleErrors()
getPossibleErrors in class ControlModel
public static java.lang.String getParameterCode(java.lang.String template,
ActivationRecord activationRecord)
public ExecutionStatus newFunctionCall(RunEnv runEnv,
Behavior behavior,
java.lang.String statement,
int codeLineNumber,
boolean stepFlag)
statement - String in the format "public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||