org.problets.domain.model.variable
Class AbstractVarModel
java.lang.Object
org.problets.domain.model.DomainModel
org.problets.domain.model.variable.AbstractVarModel
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- AccessVarModel, AggregateVarModel, AnonVarModel, ErrorVarModel, VarModel
public abstract class AbstractVarModel
- extends DomainModel
- implements java.lang.Cloneable
AbstractVarModel
Base class for
VarModel - Model of a scalar variable
PtrModel - Model of a pointer variable
AnonVarModel - Model of an anonymous variable
RefVarModel - Model of a reference variable
- Author:
- Amruth Kumar
Fields inherited from class org.problets.domain.model.DomainModel |
BOOLEAN, BREAKPOINT, CHARACTER, DOUBLE_PRECISION_REAL, ERROR_TYPE, EVAL_STATUS, expACTION, expASSIGNMENT, expAUTO_DEALLOCATION, expCALL, expCONDITION, expDECLARATION, expDEREFERENCING, expDYNAMIC_ALLOCATION, expDYNAMIC_ALLOCATION_INITIALIZATION, expDYNAMIC_DEALLOCATION, expELSE_CLAUSE, expERROR, expEXECUTION, expIF_CLAUSE, expINITIALIZATION, expINPUT, expPARAMETER_PASSING, expPRINT, expQUESTIONABLE, expREFERENCING, expRETURN, expRUNTIME_ERROR, expSEMANTIC_ERROR, expSYNTAX_ERROR, expUPDATE, IDENTITY, MAX_OBJECT_IDENTITY, MIN_OBJECT_IDENTITY, QUADRUPLE_PRECISION_REAL, RUNTIME_ERROR, SEMANTIC_ERROR, SIGNED_INTEGER, SIGNED_LONG, SIGNED_SHORT, SINGLE_PRECISION_REAL, SYNTAX_ERROR, UNDEFINED_TYPE, UNSIGNED_INTEGER, UNSIGNED_LONG, UNSIGNED_SHORT, WARNING |
Method Summary |
java.lang.Object |
clone()
Returns a clone of this object, and provides the basis for cloning of derived classes |
abstract void |
explainObject(StackModel stack,
HeapModel heap,
Behavior behavior,
java.lang.String statement,
int event,
int lineNumber,
boolean abbreviated)
|
abstract void |
explainProcess(RunEnv runEnv,
Behavior behavior,
java.lang.String statement,
int event,
int lineNumber)
|
boolean |
getAllocated()
|
boolean |
getAssigned()
|
abstract void |
getCode(java.util.Vector codeText,
java.lang.String codeType,
java.lang.String template,
int lineNumber)
|
boolean |
getDeclared()
|
int |
getMetaDataType()
|
java.lang.String |
getName()
|
abstract java.lang.String[] |
getPossibleErrors()
|
java.lang.String |
getType()
|
Value |
getValue()
|
java.util.Vector |
getValueDifference(AbstractVarModel observedModel,
int line)
Creates a ValueDifference object with the value of this VarModel
and the value of the observedModel. |
abstract void |
print()
|
void |
resetAllocated()
|
void |
resetDeclared()
|
void |
resetFlags()
|
void |
setAllocated()
|
void |
setDeclared()
|
void |
setValue(java.lang.Object inValue)
Used by Assignment Expression |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractVarModel
public AbstractVarModel(java.lang.String inputType)
clone
public java.lang.Object clone()
- Description copied from class:
DomainModel
- Returns a clone of this object, and provides the basis for cloning of derived classes
- Overrides:
clone
in class DomainModel
getName
public java.lang.String getName()
getType
public java.lang.String getType()
getMetaDataType
public int getMetaDataType()
getValue
public Value getValue()
getDeclared
public boolean getDeclared()
getAllocated
public boolean getAllocated()
getAssigned
public boolean getAssigned()
getValueDifference
public java.util.Vector getValueDifference(AbstractVarModel observedModel,
int line)
- Creates a ValueDifference object with the value of this VarModel
and the value of the observedModel. The ValueDifference object
will be the only element in the returned Vector.
Overrides AbstractVarModel.getValueDifference.
- Parameters:
observedModel
- The "current" value to be placed in the ValueDifference.line
- The line number of the difference.
- Returns:
- a Vector containing a single ValueDifference object
containing the value of this VarModel (the previous value) and the
value of the observedModel (the current value).
getCode
public abstract void getCode(java.util.Vector codeText,
java.lang.String codeType,
java.lang.String template,
int lineNumber)
getPossibleErrors
public abstract java.lang.String[] getPossibleErrors()
setValue
public void setValue(java.lang.Object inValue)
- Used by Assignment Expression
resetFlags
public void resetFlags()
setDeclared
public void setDeclared()
resetDeclared
public void resetDeclared()
setAllocated
public void setAllocated()
resetAllocated
public void resetAllocated()
explainProcess
public abstract void explainProcess(RunEnv runEnv,
Behavior behavior,
java.lang.String statement,
int event,
int lineNumber)
explainObject
public abstract void explainObject(StackModel stack,
HeapModel heap,
Behavior behavior,
java.lang.String statement,
int event,
int lineNumber,
boolean abbreviated)
print
public abstract void print()