Class Mark
java.lang.Object
org.snakeyaml.engine.v2.exceptions.Mark
- All Implemented Interfaces:
Serializable
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.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate readable YAML with indent 4 and n ot longer that 75 characters longcreateSnippet
(int indent, int maxLength) Create readable snippetint[]
getterint
starts with 0int
getIndex()
starts with 0int
getLine()
starts with 0getName()
getterint
getterprivate boolean
isLineBreak
(int c) private static int[]
toCodePoints
(char[] str) toString()
-
Field Details
-
name
-
index
private final int index -
line
private final int line -
column
private final int column -
buffer
private final int[] buffer -
pointer
private final int pointer
-
-
Constructor Details
-
Mark
CreatesMark
- Parameters:
name
- - the name to be used as identifierindex
- - the index from the beginning of the streamline
- - line of the mark from beginning of the streamcolumn
- - column of the mark from beginning of the linebuffer
- - the datapointer
- - the position of the mark from the beginning of the data
-
Mark
This constructor is only for test- Parameters:
name
- - the name to be used as identifierindex
- - the index from the beginning of the streamline
- - line of the mark from beginning of the streamcolumn
- - column of the mark from beginning of the linestr
- - the datapointer
- - the position of the mark from the beginning of the data
-
-
Method Details
-
toCodePoints
private static int[] toCodePoints(char[] str) -
isLineBreak
private boolean isLineBreak(int c) -
createSnippet
Create readable snippet- Parameters:
indent
- - the indentmaxLength
- - cut data after this length- Returns:
- readable piece of YAML where a problem detected
-
createSnippet
Create readable YAML with indent 4 and n ot longer that 75 characters long- Returns:
- readable piece of YAML where a problem detected
-
toString
-
getName
getter- Returns:
- name of the data stream
-
getLine
public int getLine()starts with 0- Returns:
- line number
-
getColumn
public int getColumn()starts with 0- Returns:
- column number
-
getIndex
public int getIndex()starts with 0- Returns:
- character number
-
getBuffer
public int[] getBuffer()getter- Returns:
- data with the error
-
getPointer
public int getPointer()getter- Returns:
- pointer in the data to the error
-