Interface SingleIncludeChecker

  • All Known Implementing Classes:
    BasicSingleIncludeChecker

    public interface SingleIncludeChecker
    Checks that a file is included only once. This is important to prevent circular includes. When the LexicalAnalyzer realizes that a BASIC program tries to include another file, it uses this checker.
    Author:
    Peter Verhas
    • Method Detail

      • check

        void check​(java.lang.String key)
            throws java.io.IOException
        Check that the source file was not included yet. If the file was already included then the method throws IOException.
        Parameters:
        key - in a unique key that identifies a file. This is usually the full path to the file. It is important that the key for the file is always the same otherwise the checker can not recognize the repeated include.
        Throws:
        java.io.IOException - if the file was already included.