Package com.scriptbasic.spi
Interface Command
- All Superinterfaces:
AnalysisResult,Executor
- All Known Implementing Classes:
AbstractCommand,AbstractCommandExpressionListed,AbstractCommandIfElseKind,AbstractCommandIfKind,AbstractCommandLeftValueListed,AbstractCommandSelectPart,AbstractInsecureCommand,CommandCall,CommandCase,CommandElse,CommandElseIf,CommandEndIf,CommandEndSelect,CommandEndSub,CommandFor,CommandGlobal,CommandIf,CommandLet,CommandLocal,CommandMethod,CommandNext,CommandPrint,CommandReturn,CommandSelect,CommandSub,CommandUse,CommandWend,CommandWhile
public interface Command extends AnalysisResult, Executor
Classes that provide methods to execute a command implement this interface.
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.
- Author:
- Peter Verhas date June 15, 2012
-
Method Summary
Modifier and Type Method Description voidcheckedExecute(Interpreter interpreter)CommandgetNextCommand()
-
Method Details
-
getNextCommand
Command getNextCommand() -
checkedExecute
- Throws:
ScriptBasicException
-