Package atessera.comp
Class CompilationTask
java.lang.Object
atessera.comp.CompilationTask
Describes a compilation job to be executed by a
Compiler.
A task bundles all the information needed to run one or more external tools in sequence:
- Text sources — named text files (e.g.
main.tex,src.plot) to be written into the working directory. - Binary sources — named binary files (e.g. images) to be placed alongside the text sources.
- Commands — shell commands to execute in order. If any command returns a non-zero exit code, execution stops immediately.
- Save rules — lists of file names to collect from the working directory after compilation (separate lists for success and failure scenarios).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanBinary files to write into the working directory before compilation.Shell commands to execute sequentially in the working directory.Names of binary files to collect from the working directory when all commands complete successfully.Names of text files to collect from the working directory when a command fails (non-zero exit code).Names of text files to collect from the working directory when all commands complete successfully.Text files to write into the working directory before compilation.inthashCode()voidsetBinarySources(Map<String, byte[]> binarySources) Binary files to write into the working directory before compilation.voidsetCommands(List<String> commands) Shell commands to execute sequentially in the working directory.voidsetSaveBinaryFilesOnSuccess(List<String> saveBinaryFilesOnSuccess) Names of binary files to collect from the working directory when all commands complete successfully.voidsetSaveTextFilesOnFailure(List<String> saveTextFilesOnFailure) Names of text files to collect from the working directory when a command fails (non-zero exit code).voidsetSaveTextFilesOnSuccess(List<String> saveTextFilesOnSuccess) Names of text files to collect from the working directory when all commands complete successfully.voidsetTextSources(Map<String, List<String>> textSources) Text files to write into the working directory before compilation.toString()
-
Constructor Details
-
CompilationTask
public CompilationTask() -
CompilationTask
-
-
Method Details
-
getTextSources
Text files to write into the working directory before compilation. Keys are file names (relative to the working directory root), values are the file contents as lists of lines. -
getBinarySources
Binary files to write into the working directory before compilation. Keys are file names, values are raw byte contents. -
getCommands
Shell commands to execute sequentially in the working directory. Execution stops on the first non-zero exit code. -
getSaveTextFilesOnSuccess
Names of text files to collect from the working directory when all commands complete successfully. -
getSaveBinaryFilesOnSuccess
Names of binary files to collect from the working directory when all commands complete successfully. -
getSaveTextFilesOnFailure
Names of text files to collect from the working directory when a command fails (non-zero exit code). -
setTextSources
Text files to write into the working directory before compilation. Keys are file names (relative to the working directory root), values are the file contents as lists of lines. -
setBinarySources
Binary files to write into the working directory before compilation. Keys are file names, values are raw byte contents. -
setCommands
Shell commands to execute sequentially in the working directory. Execution stops on the first non-zero exit code. -
setSaveTextFilesOnSuccess
Names of text files to collect from the working directory when all commands complete successfully. -
setSaveBinaryFilesOnSuccess
Names of binary files to collect from the working directory when all commands complete successfully. -
setSaveTextFilesOnFailure
Names of text files to collect from the working directory when a command fails (non-zero exit code). -
equals
-
hashCode
public int hashCode() -
toString
-