Package org.eclipse.jgit.util
Class ProcessResult
- java.lang.Object
-
- org.eclipse.jgit.util.ProcessResult
-
public class ProcessResult extends java.lang.ObjectDescribes the result of running an external process.- Since:
- 3.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProcessResult.StatusStatus of a process' execution.
-
Field Summary
Fields Modifier and Type Field Description private intexitCodeThe exit code of the process.private ProcessResult.StatusstatusStatus of the process' execution.
-
Constructor Summary
Constructors Constructor Description ProcessResult(int exitCode, ProcessResult.Status status)Constructor for ProcessResult.ProcessResult(ProcessResult.Status status)Instantiates a process result with the given status and an exit code of-1.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetExitCode()Get exit code of the process.ProcessResult.StatusgetStatus()Get the status of the process' execution.booleanisExecutedWithError()Whether the execution occurred and resulted in an error
-
-
-
Field Detail
-
exitCode
private final int exitCode
The exit code of the process.
-
status
private final ProcessResult.Status status
Status of the process' execution.
-
-
Constructor Detail
-
ProcessResult
public ProcessResult(ProcessResult.Status status)
Instantiates a process result with the given status and an exit code of-1.- Parameters:
status- Status describing the execution of the external process.
-
ProcessResult
public ProcessResult(int exitCode, ProcessResult.Status status)Constructor for ProcessResult.
- Parameters:
exitCode- Exit code of the process.status- Status describing the execution of the external process.
-
-
Method Detail
-
getExitCode
public int getExitCode()
Get exit code of the process.- Returns:
- The exit code of the process.
-
getStatus
public ProcessResult.Status getStatus()
Get the status of the process' execution.- Returns:
- The status of the process' execution.
-
isExecutedWithError
public boolean isExecutedWithError()
Whether the execution occurred and resulted in an error- Returns:
trueif the execution occurred and resulted in a return code different from 0,falseotherwise.- Since:
- 4.0
-
-