Package com.scriptbasic.syntax
Class BasicProgram
java.lang.Object
com.scriptbasic.syntax.AbstractBasicProgramPostprocessing
com.scriptbasic.syntax.BasicProgram
- All Implemented Interfaces:
BuildableProgram,Program
public final class BasicProgram extends AbstractBasicProgramPostprocessing
-
Constructor Summary
Constructors Constructor Description BasicProgram() -
Method Summary
Modifier and Type Method Description voidaddCommand(Command command)Add a new command to the list of commands.java.util.Collection<Command>getCommands()protected CommandgetFirstCommand()CommandgetNamedCommand(java.lang.String name)java.lang.Iterable<java.lang.String>getNamedCommandNames()protected java.util.Map<java.lang.String,CommandSub>getSubroutineMap()voidreset()Calling this method will remove all previously built code from the program.Methods inherited from class com.scriptbasic.syntax.AbstractBasicProgramPostprocessing
getStartCommand, postprocess
-
Constructor Details
-
BasicProgram
public BasicProgram()
-
-
Method Details
-
reset
public void reset()Description copied from interface:BuildableProgramCalling this method will remove all previously built code from the program. This method should be called if the sameBuildableProgramobject is used to execute different programs, one after the other.Without calling this method the program would be concatenated and the second execution would contain the program codes of the first program and after that the second.
-
addCommand
Description copied from interface:BuildableProgramAdd a new command to the list of commands.- Parameters:
command- parameter
-
getFirstCommand
- Specified by:
getFirstCommandin classAbstractBasicProgramPostprocessing
-
getCommands
-
getNamedCommandNames
public java.lang.Iterable<java.lang.String> getNamedCommandNames() -
getSubroutineMap
- Specified by:
getSubroutineMapin classAbstractBasicProgramPostprocessing- Returns:
- the subroutineMap
-
getNamedCommand
-