Record Class BytecodeExecutor.ExecutionResult
java.lang.Object
java.lang.Record
org.ek9lang.compiler.backend.jvm.BytecodeExecutor.ExecutionResult
- Record Components:
stdout- Captured standard output (the program's real output only — never the panic/require diagnostic, which is routed to stderr, faithful to production and native)stderr- Captured standard error (includes the uncaught-exception / require|assert diagnostic)exitCode- 0 for a clean run; non-zero if the program panicked or the harness faultedduration- Time taken to executeprogramThrew- true iff the EK9 PROGRAM threw an uncaught exception / require|assert breach (a legitimate non-zero-exit outcome) — as opposed to the harness itself failing to load/invoke it (exitCode!=0 with programThrew=false)
- Enclosing class:
BytecodeExecutor
-
Constructor Summary
ConstructorsConstructorDescriptionExecutionResult(String stdout, String stderr, int exitCode, Duration duration, boolean programThrew) Creates an instance of aExecutionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.intexitCode()Returns the value of theexitCoderecord component.final inthashCode()Returns a hash code value for this object.(package private) booleanbooleanReturns the value of theprogramThrewrecord component.stderr()Returns the value of thestderrrecord component.stdout()Returns the value of thestdoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExecutionResult
public ExecutionResult(String stdout, String stderr, int exitCode, Duration duration, boolean programThrew) Creates an instance of aExecutionResultrecord class.- Parameters:
stdout- the value for thestdoutrecord componentstderr- the value for thestderrrecord componentexitCode- the value for theexitCoderecord componentduration- the value for thedurationrecord componentprogramThrew- the value for theprogramThrewrecord component
-
-
Method Details
-
isSuccess
boolean isSuccess() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
stdout
-
stderr
-
exitCode
-
duration
-
programThrew
public boolean programThrew()Returns the value of theprogramThrewrecord component.- Returns:
- the value of the
programThrewrecord component
-