Package atessera.comp

Class CompilationTask

java.lang.Object
atessera.comp.CompilationTask

public final class CompilationTask extends Object
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 Details

  • Method Details

    • getTextSources

      public Map<String,List<String>> 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

      public Map<String,byte[]> getBinarySources()
      Binary files to write into the working directory before compilation. Keys are file names, values are raw byte contents.
    • getCommands

      public List<String> getCommands()
      Shell commands to execute sequentially in the working directory. Execution stops on the first non-zero exit code.
    • getSaveTextFilesOnSuccess

      public List<String> getSaveTextFilesOnSuccess()
      Names of text files to collect from the working directory when all commands complete successfully.
    • getSaveBinaryFilesOnSuccess

      public List<String> getSaveBinaryFilesOnSuccess()
      Names of binary files to collect from the working directory when all commands complete successfully.
    • getSaveTextFilesOnFailure

      public List<String> getSaveTextFilesOnFailure()
      Names of text files to collect from the working directory when a command fails (non-zero exit code).
    • setTextSources

      public void setTextSources(Map<String,List<String>> textSources)
      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

      public void setBinarySources(Map<String,byte[]> binarySources)
      Binary files to write into the working directory before compilation. Keys are file names, values are raw byte contents.
    • setCommands

      public void setCommands(List<String> commands)
      Shell commands to execute sequentially in the working directory. Execution stops on the first non-zero exit code.
    • setSaveTextFilesOnSuccess

      public void setSaveTextFilesOnSuccess(List<String> saveTextFilesOnSuccess)
      Names of text files to collect from the working directory when all commands complete successfully.
    • setSaveBinaryFilesOnSuccess

      public void setSaveBinaryFilesOnSuccess(List<String> saveBinaryFilesOnSuccess)
      Names of binary files to collect from the working directory when all commands complete successfully.
    • setSaveTextFilesOnFailure

      public void setSaveTextFilesOnFailure(List<String> saveTextFilesOnFailure)
      Names of text files to collect from the working directory when a command fails (non-zero exit code).
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object