Class BasicProgram

All Implemented Interfaces:
BuildableProgram, Program

public final class BasicProgram extends AbstractBasicProgramPostprocessing
  • Constructor Details

    • BasicProgram

      public BasicProgram()
  • Method Details

    • reset

      public void reset()
      Description copied from interface: BuildableProgram
      Calling this method will remove all previously built code from the program. This method should be called if the same BuildableProgram object 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

      public void addCommand(Command command)
      Description copied from interface: BuildableProgram
      Add a new command to the list of commands.
      Parameters:
      command - parameter
    • getFirstCommand

      protected Command getFirstCommand()
      Specified by:
      getFirstCommand in class AbstractBasicProgramPostprocessing
    • getCommands

      public Collection<Command> getCommands()
    • getNamedCommandNames

      public Iterable<String> getNamedCommandNames()
    • getSubroutineMap

      protected Map<String,CommandSub> getSubroutineMap()
      Specified by:
      getSubroutineMap in class AbstractBasicProgramPostprocessing
      Returns:
      the subroutineMap
    • getNamedCommand

      public Command getNamedCommand(String name)