Class BasicSingleIncludeChecker

java.lang.Object
com.scriptbasic.sourceproviders.BasicSingleIncludeChecker
All Implemented Interfaces:
SingleIncludeChecker

public class BasicSingleIncludeChecker
extends java.lang.Object
implements SingleIncludeChecker
A very simple (thus basic) single include checker implementation.

Author:
Peter Verhas
  • Constructor Summary

    Constructors 
    Constructor Description
    BasicSingleIncludeChecker()  
  • Method Summary

    Modifier and Type Method Description
    void check​(java.lang.String key)
    Check that the source file was not included yet.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • check

      public 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.
      Specified by:
      check in interface SingleIncludeChecker
      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.