Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.exceptions

public final Class Mark

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, org.snakeyaml.engine.v2.common.CharConstants

Location of a problem in the YAML document. Its only use is producing nice error messages. Parser does not use it for any other purposes.

Field Summary

Modifier and TypeField and Description
private final int[]
private final int
private final int
private final int
private final String
private final int

Constructor Summary

AccessConstructor and Description
public
Mark(String
- the name to be used as identifier
name
,
int
- the index from the beginning of the stream
index
,
int
- line of the mark from beginning of the stream
line
,
int
- column of the mark from beginning of the line
column
,
int[]
- the data
buffer
,
int
- the position of the mark from the beginning of the data
pointer
)

Creates Mark

public
Mark(String
- the name to be used as identifier
name
,
int
- the index from the beginning of the stream
index
,
int
- line of the mark from beginning of the stream
line
,
int
- column of the mark from beginning of the line
column
,
char[]
- the data
str
,
int
- the position of the mark from the beginning of the data
pointer
)

This constructor is only for test

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

readable piece of YAML where a problem detected
createSnippet
(int
- the indent
indent
,
int
- cut data after this length
maxLength
)

Create readable snippet

public String

Returns:

readable piece of YAML where a problem detected
createSnippet
()

Create readable YAML with indent 4 and n ot longer that 75 characters long

public int[]

Returns:

data with the error
getBuffer
()

getter

public int

Returns:

column number
getColumn
()

starts with 0

public int

Returns:

character number
getIndex
()

starts with 0

public int

Returns:

line number
getLine
()

starts with 0

public String

Returns:

name of the data stream
getName
()

getter

public int

Returns:

pointer in the data to the error
getPointer
()

getter

private boolean
isLineBreak(int c)

private static int[]
toCodePoints(char[] str)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bufferback to summary
private final int[] buffer
columnback to summary
private final int column
indexback to summary
private final int index
lineback to summary
private final int line
nameback to summary
private final String name
pointerback to summary
private final int pointer

Constructor Detail

Markback to summary
public Mark(String name, int index, int line, int column, int[] buffer, int pointer)

Creates Mark

Parameters
name:String

- the name to be used as identifier

index:int

- the index from the beginning of the stream

line:int

- line of the mark from beginning of the stream

column:int

- column of the mark from beginning of the line

buffer:int[]

- the data

pointer:int

- the position of the mark from the beginning of the data

Markback to summary
public Mark(String name, int index, int line, int column, char[] str, int pointer)

This constructor is only for test

Parameters
name:String

- the name to be used as identifier

index:int

- the index from the beginning of the stream

line:int

- line of the mark from beginning of the stream

column:int

- column of the mark from beginning of the line

str:char[]

- the data

pointer:int

- the position of the mark from the beginning of the data

Method Detail

createSnippetback to summary
public String createSnippet(int indent, int maxLength)

Create readable snippet

Parameters
indent:int

- the indent

maxLength:int

- cut data after this length

Returns:String

readable piece of YAML where a problem detected

createSnippetback to summary
public String createSnippet()

Create readable YAML with indent 4 and n ot longer that 75 characters long

Returns:String

readable piece of YAML where a problem detected

getBufferback to summary
public int[] getBuffer()

getter

Returns:int[]

data with the error

getColumnback to summary
public int getColumn()

starts with 0

Returns:int

column number

getIndexback to summary
public int getIndex()

starts with 0

Returns:int

character number

getLineback to summary
public int getLine()

starts with 0

Returns:int

line number

getNameback to summary
public String getName()

getter

Returns:String

name of the data stream

getPointerback to summary
public int getPointer()

getter

Returns:int

pointer in the data to the error

isLineBreakback to summary
private boolean isLineBreak(int c)
toCodePointsback to summary
private static int[] toCodePoints(char[] str)
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.

Annotations
@Override