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

public Class FormatError

extends Object
Class Inheritance
Static Imports
java.nio.charset.StandardCharsets.UTF_8

An error in a patch script

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
FormatError.Severity

Classification of an error.

Field Summary

Modifier and TypeField and Description
private final byte[]
private final String
private final int
private final FormatError.Severity

Constructor Summary

AccessConstructor and Description
pack-priv
FormatError(final byte[] buffer, final int ptr, final FormatError.Severity sev, final String msg)

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the byte buffer holding the patch script.
getBuffer
()

Get the byte buffer holding the patch script.

public String

Returns:

line of the patch script the error appears on.
getLineText
()

Get line of the patch script the error appears on.

public String

Returns:

a message describing the error.
getMessage
()

Get a message describing the error.

public int

Returns:

byte offset within getBuffer() where the error is.
getOffset
()

Get byte offset within getBuffer() where the error is.

public FormatError.Severity

Returns:

the severity of the error.
getSeverity
()

Get the severity of the error.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bufback to summary
private final byte[] buf
messageback to summary
private final String message
offsetback to summary
private final int offset
severityback to summary
private final FormatError.Severity severity

Constructor Detail

FormatErrorback to summary
pack-priv FormatError(final byte[] buffer, final int ptr, final FormatError.Severity sev, final String msg)

Method Detail

getBufferback to summary
public byte[] getBuffer()

Get the byte buffer holding the patch script.

Returns:byte[]

the byte buffer holding the patch script.

getLineTextback to summary
public String getLineText()

Get line of the patch script the error appears on.

Returns:String

line of the patch script the error appears on.

getMessageback to summary
public String getMessage()

Get a message describing the error.

Returns:String

a message describing the error.

getOffsetback to summary
public int getOffset()

Get byte offset within getBuffer() where the error is.

Returns:int

byte offset within getBuffer() where the error is.

getSeverityback to summary
public FormatError.Severity getSeverity()

Get the severity of the error.

Returns:FormatError.Severity

the severity of the error.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.patch back to summary

public final Enum FormatError.Severity

extends Enum<FormatError.Severity>
Class Inheritance

Classification of an error.

Field Summary

Modifier and TypeField and Description
public static final FormatError.Severity
ERROR

The error indicates the script is severely flawed.

public static final FormatError.Severity
WARNING

The error is unexpected, but can be worked around.

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

ERRORback to summary
public static final FormatError.Severity ERROR

The error indicates the script is severely flawed.

WARNINGback to summary
public static final FormatError.Severity WARNING

The error is unexpected, but can be worked around.

Constructor Detail

Severityback to summary
private Severity()

Method Detail

valueOfback to summary
public static FormatError.Severity valueOf(String name)
valuesback to summary
public static FormatError.Severity[] values()