Package org.ek9lang.cli
Class FileCache
java.lang.Object
org.ek9lang.cli.FileCache
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 Summary
ConstructorDescriptionFileCache
(CommandLineDetails commandLine) Create a new FileCache referencing a specific commandLine. -
Method Summary
Modifier and TypeMethodDescription(package private) void
Supplies a list of all files that are compilable by the ek9 compiler.Supplies the list of all files that are to be part of the build.Supplies a list of all files that are not compilable by the ek9 compiler.Supplies a list of all project files that have been modified after the target executable has been created.Supplies a list of all ek9 compilable source files that have been modified after the target executable has been created.Uses what was specified on the command line and in any 'package' construct to determine which files should be packaged for use.Supplies a list of standard files to exclude.Supplies a list of standard file to include.(package private) File
Might not actually exist, but here is a handle to it.(package private) boolean
true if the target executable exists and is newer than any of the files that would make up this artefact.(package private) boolean
true if the target artefact exists - but it maybe out of date.(package private) void
setDevBuild
(boolean devBuild) Configure to be a development based build, this includes files from the 'dev/' directory then.
-
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
Supplies a list of standard file to include. These are typically **.ek9, **.properties, etc. Note uses GLOB format. -
getStandardExcludes
Supplies a list of standard files to exclude. These are typically 'dot' directories and files. Note uses GLOB format. -
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
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
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
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
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
Uses what was specified on the command line and in any 'package' construct to determine which files should be packaged for use.
-