Package rife.bld.extension.tools
Record Class ProcessExecutor.ProcessResult
java.lang.Object
java.lang.Record
rife.bld.extension.tools.ProcessExecutor.ProcessResult
- Record Components:
exitCode- the exit code, or -1 if timed outoutput- the captured stdout/stderr joined with the system line separator; empty string whenProcessExecutor.inheritIO()wastruetimedOut- true if the process exceeded the timeout
- Enclosing class:
- ProcessExecutor
public static record ProcessExecutor.ProcessResult(int exitCode, String output, boolean timedOut)
extends Record
Result of a process execution.
-
Constructor Summary
ConstructorsConstructorDescriptionProcessResult(int exitCode, String output, boolean timedOut) Creates an instance of aProcessResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.booleanReturns true if the process exited with code 0 and did not time out.output()Returns the value of theoutputrecord component.booleantimedOut()Returns the value of thetimedOutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
isSuccess
public boolean isSuccess()Returns true if the process exited with code 0 and did not time out. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
exitCode
public int exitCode()Returns the value of theexitCoderecord component.- Returns:
- the value of the
exitCoderecord component
-
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
timedOut
public boolean timedOut()Returns the value of thetimedOutrecord component.- Returns:
- the value of the
timedOutrecord component
-