public interface Command extends AnalysisResult, Executor
Since the objects are created as a result of the BASIC program analysis any
command is also an AnalysisResult
.
The implementing classes contain the execution code of the different program commands, like 'for', 'if' and so on.
These objects are multitons, do not contain any runtime data, since many interpreters may execute the same program at the same time. The code also has to be thread safe.
The data that may be stored in a command is referential data to other Commands that are in the same program. For example a command implementing 'while' has an object that points to the corresponding 'wend', but should not contain any data that holds the value of the expression evaluated.
Modifier and Type | Method and Description |
---|---|
void |
checkedExecute(ExtendedInterpreter interpreter) |
Command |
getNextCommand() |
Command getNextCommand()
void checkedExecute(ExtendedInterpreter interpreter) throws ExecutionException
ExecutionException
Copyright © 2013 Verhas and Verhas Software Craftsmen. All Rights Reserved.