Package atessera.comp

Class CompilationResult

java.lang.Object
atessera.comp.CompilationResult

public final class CompilationResult extends Object
Holds the outcome of a compilation executed by a Compiler.

This DTO carries all information about the compilation run:

  • The captured stdout and stderr of each executed command (one entry per command in output and errorOutput).
  • Any text or binary output files collected according to the save rules.
  • The exit code of the last executed command, or -1 if an internal exception occurred.
  • A stack trace string in case of an internal error.
See Also:
  • Constructor Details

  • Method Details

    • getOutput

      public List<List<String>> getOutput()
      Standard output captured from each command. Each element in the outer list corresponds to one command; the inner list contains the lines printed by that command.
    • getErrorOutput

      public List<List<String>> getErrorOutput()
      Standard error captured from each command. Structured identically to output.
    • getTextOutputFiles

      public Map<String,List<String>> getTextOutputFiles()
      Text files collected from the working directory. Keys are file names (as specified in the task's save rules), values are file contents as lists of lines.
    • getBinaryOutputFiles

      public Map<String,byte[]> getBinaryOutputFiles()
      Binary files collected from the working directory. Keys are file names (as specified in the task's save rules), values are raw byte contents.
    • getExitCode

      public int getExitCode()
      Exit code of the last executed command. A value of 0 indicates success. A value of -1 indicates that an internal exception occurred before or during compilation.
    • getStackTrace

      public String getStackTrace()
      Stack trace captured when an internal exception occurs during compilation. null if no exception was thrown.
    • setOutput

      public void setOutput(List<List<String>> output)
      Standard output captured from each command. Each element in the outer list corresponds to one command; the inner list contains the lines printed by that command.
    • setErrorOutput

      public void setErrorOutput(List<List<String>> errorOutput)
      Standard error captured from each command. Structured identically to output.
    • setTextOutputFiles

      public void setTextOutputFiles(Map<String,List<String>> textOutputFiles)
      Text files collected from the working directory. Keys are file names (as specified in the task's save rules), values are file contents as lists of lines.
    • setBinaryOutputFiles

      public void setBinaryOutputFiles(Map<String,byte[]> binaryOutputFiles)
      Binary files collected from the working directory. Keys are file names (as specified in the task's save rules), values are raw byte contents.
    • setExitCode

      public void setExitCode(int exitCode)
      Exit code of the last executed command. A value of 0 indicates success. A value of -1 indicates that an internal exception occurred before or during compilation.
    • setStackTrace

      public void setStackTrace(String stackTrace)
      Stack trace captured when an internal exception occurs during compilation. null if no exception was thrown.
    • 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