Class FileCache

java.lang.Object
org.ek9lang.cli.FileCache

final class FileCache extends Object
Because we need access to the full file list or partial file list filtered. We need to load up references to the files once and then filter as needed. Obviously for a Language Server this would be done with listeners and watchers. But for a command line process - we have to reload all the time. This enables us to keep the base set of full files and then provide cut down lists depending on what command is to be used.
  • Constructor Details

    • FileCache

      FileCache(CommandLineDetails commandLine)
      Create a new FileCache referencing a specific commandLine.
  • Method Details

    • setDevBuild

      void setDevBuild(boolean devBuild)
      Configure to be a development based build, this includes files from the 'dev/' directory then.
    • isTargetExecutableArtefactPresent

      boolean isTargetExecutableArtefactPresent()
      true if the target artefact exists - but it maybe out of date.
    • isTargetExecutableArtefactCurrent

      boolean isTargetExecutableArtefactCurrent()
      true if the target executable exists and is newer than any of the files that would make up this artefact. i.e. compilable ek9 files or other resources.
    • getTargetExecutableArtefact

      File getTargetExecutableArtefact()
      Might not actually exist, but here is a handle to it.
      Returns:
      The File reference to the target executable artefact (jar file for java).
    • deleteTargetExecutableArtefact

      void deleteTargetExecutableArtefact()
    • getStandardIncludes

      List<String> getStandardIncludes()
      Supplies a list of standard file to include. These are typically **.ek9, **.properties, etc. Note uses GLOB format.
    • getStandardExcludes

      List<String> getStandardExcludes()
      Supplies a list of standard files to exclude. These are typically 'dot' directories and files. Note uses GLOB format.
    • getIncrementalFilesPartOfBuild

      List<File> getIncrementalFilesPartOfBuild()
      Supplies a list of all ek9 compilable source files that have been modified after the target executable has been created. i.e. what source file has been modified that should trigger a new build.
    • getIncrementalCompilableProjectFiles

      List<File> getIncrementalCompilableProjectFiles()
      Supplies a list of all project files that have been modified after the target executable has been created. i.e. what file has been modified that should trigger a new build.
    • getAllCompilableProjectFiles

      List<File> getAllCompilableProjectFiles()
      Supplies a list of all files that are compilable by the ek9 compiler. This also applies any includes and exclude directives from any 'package' construct. Honours the idea of including or excluding 'dev/' files.
    • getAllNonCompilableProjectFiles

      List<File> getAllNonCompilableProjectFiles()
      Supplies a list of all files that are not compilable by the ek9 compiler. This also applies any includes and exclude directives from any 'package' construct. Honours the idea of including or excluding 'dev/' files.
    • getAllFilesPartOfBuild

      List<File> getAllFilesPartOfBuild()
      Supplies the list of all files that are to be part of the build. If this is a 'dev' build then the 'dev/' directory is also included. This also applies any includes and exclude directives from any 'package' construct.
    • getPackageFiles

      List<File> getPackageFiles()
      Uses what was specified on the command line and in any 'package' construct to determine which files should be packaged for use.