Class StringSourceProvider

All Implemented Interfaces:
SourceProvider

public class StringSourceProvider
extends SingleIncludeNonRelativeSourceProvider
This implementation provides the source from strings.
Author:
Peter Verhas
  • Constructor Details

  • Method Details

    • addSource

      public void addSource​(java.lang.String fileName, java.lang.String sourceCode)
      Add a new source to the set of available sources.
      Parameters:
      fileName - the name of the source. This name can be used in include statements in other BASIC sources and also this can be used to get the reader from the provider.
      sourceCode - The actual code of the source program.
    • getSource

      public SourceReader getSource​(java.lang.String sourceName) throws java.io.IOException

      This implementation returns a GenericSourceReader.

      Specified by:
      getSource in class SingleIncludeNonRelativeSourceProvider
      Throws:
      java.io.IOException