Top Description Inners Fields Constructors Methods
org.eclipse.jgit.util

public Class ProcessResult

extends Object
Class Inheritance

Describes the result of running an external process.
Since
3.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ProcessResult.Status

Status of a process' execution.

Field Summary

Modifier and TypeField and Description
private final int
exitCode

The exit code of the process.

private final ProcessResult.Status
status

Status of the process' execution.

Constructor Summary

AccessConstructor and Description
public
ProcessResult(ProcessResult.Status
Status describing the execution of the external process.
status
)

Instantiates a process result with the given status and an exit code of -1.

public
ProcessResult(int
Exit code of the process.
exitCode
,
ProcessResult.Status
Status describing the execution of the external process.
status
)

Constructor for ProcessResult.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The exit code of the process.
getExitCode
()

Get exit code of the process.

public ProcessResult.Status

Returns:

The status of the process' execution.
getStatus
()

Get the status of the process' execution.

public boolean

Returns:

true if the execution occurred and resulted in a return code different from 0, false otherwise.
isExecutedWithError
()

Whether the execution occurred and resulted in an error

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

exitCodeback to summary
private final int exitCode

The exit code of the process.

statusback to summary
private final ProcessResult.Status status

Status of the process' execution.

Constructor Detail

ProcessResultback to summary
public ProcessResult(ProcessResult.Status status)

Instantiates a process result with the given status and an exit code of -1.

Parameters
status:ProcessResult.Status

Status describing the execution of the external process.

ProcessResultback to summary
public ProcessResult(int exitCode, ProcessResult.Status status)

Constructor for ProcessResult.

Parameters
exitCode:int

Exit code of the process.

status:ProcessResult.Status

Status describing the execution of the external process.

Method Detail

getExitCodeback to summary
public int getExitCode()

Get exit code of the process.

Returns:int

The exit code of the process.

getStatusback to summary
public ProcessResult.Status getStatus()

Get the status of the process' execution.

Returns:ProcessResult.Status

The status of the process' execution.

isExecutedWithErrorback to summary
public boolean isExecutedWithError()

Whether the execution occurred and resulted in an error

Returns:boolean

true if the execution occurred and resulted in a return code different from 0, false otherwise.

Since
4.0
org.eclipse.jgit.util back to summary

public final Enum ProcessResult.Status

extends Enum<ProcessResult.Status>
Class Inheritance

Status of a process' execution.

Field Summary

Modifier and TypeField and Description
public static final ProcessResult.Status
NOT_PRESENT

The script was not found on disk and thus could not be launched.

public static final ProcessResult.Status
NOT_SUPPORTED

The script was found but could not be launched since it was not supported by the current FS.

public static final ProcessResult.Status
OK

The script was found and launched properly.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ProcessResult.Status
public static ProcessResult.Status[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NOT_PRESENTback to summary
public static final ProcessResult.Status NOT_PRESENT

The script was not found on disk and thus could not be launched.

NOT_SUPPORTEDback to summary
public static final ProcessResult.Status NOT_SUPPORTED

The script was found but could not be launched since it was not supported by the current FS.

OKback to summary
public static final ProcessResult.Status OK

The script was found and launched properly. It may still have exited with a non-zero exitCode.

Constructor Detail

Statusback to summary
private Status()

Method Detail

valueOfback to summary
public static ProcessResult.Status valueOf(String name)
valuesback to summary
public static ProcessResult.Status[] values()