|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlij.runtime.DefInstance
public abstract class DefInstance
This class executes Def's. It's main purpose is to decouple the execution code from the model.Def class
Nested Class Summary | |
---|---|
private static class |
DefInstance.DefAgentInstance
A DefInstance subclass for AGENT (i.e. |
private static class |
DefInstance.DefMessageInstance
A DefInstance subclass for MESSAGE (i.e. |
private static class |
DefInstance.DefNullOpInstance
A DefInstance subclass for NULLOP events. |
Field Summary | |
---|---|
protected AgentInstance |
agent
|
protected Def |
def
|
protected Interpreter |
interpreter
|
Constructor Summary | |
---|---|
DefInstance()
|
Method Summary | |
---|---|
private Result.State |
checkConstraints()
Checks the constraints of this DefInstance. |
static DefInstance |
createDefInstance(Def _def,
Interpreter _interpreter,
AgentInstance _agent)
Factory method for creating an instance of a DefInstance subclass. |
Result.State |
execute()
Executes this DefInstance. |
abstract Result.State |
executeEvent()
This method needs to be implemented by any subclasses. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Def def
protected Interpreter interpreter
protected AgentInstance agent
Constructor Detail |
---|
public DefInstance()
Method Detail |
---|
public static DefInstance createDefInstance(Def _def, Interpreter _interpreter, AgentInstance _agent)
_def
- The Def that will be encapsulated by this DefInstance object._interpreter
- A reference to the currently running Interpreter
instance._agent
- The AgentInstance performing the instantiation.
public Result.State execute() throws InterpreterException
InterpreterException
private Result.State checkConstraints() throws InterpreterException
InterpreterException
public abstract Result.State executeEvent() throws InterpreterException
InterpreterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |