Class YamlCommentReader
java.lang.Object
org.simpleyaml.configuration.comments.YamlCommentMapper
org.simpleyaml.configuration.comments.YamlCommentReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Commentable
- Direct Known Subclasses:
YamlCommentDumper,YamlCommentParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumfinal classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected charprotected Stringprotected KeyTree.Nodeprotected KeyTree.Nodeprotected YamlCommentReader.ReadingExplicitStyleprotected intprotected booleanprotected booleanprotected booleanprotected Stringprotected intprotected YamlCommentReader.ReadingQuoteStyleprotected YamlCommentReader.ReaderStageprotected StringFields inherited from class org.simpleyaml.configuration.comments.YamlCommentMapper
keyTree, NO_COMMENTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleancanStartSpecialIndent(int indent) protected booleanprotected voidcheckSpecialLines(boolean wasLiteral, int indent) protected voidprotected voidprotected voidprotected voidprotected booleanhasChar()protected booleanhasKey()protected booleanhasNext()protected voidinQuote(YamlCommentReader.ReadingQuoteStyle quoteStyle) protected booleanisBlank()protected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected final booleanprotected booleanprotected booleanstatic booleanisSpace(char c) protected booleannextChar()protected final booleanprotected booleannextLine()protected charpeek(int offset) protected voidprotected voidprocessMultiline(boolean inQuoteBlock) protected intprotected intreadIndent(boolean special) protected StringreadKey()protected voidreadKeyMultiline(StringBuilder keyBuilder) protected abstract StringreadLine()protected voidreadTag()protected voidprotected voidprotected voidtoString()protected KeyTree.Nodetrack()protected KeyTree.Nodeprotected KeyTree.Nodeprotected voidprotected voidtrackListElement(int indent) Methods inherited from class org.simpleyaml.configuration.comments.YamlCommentMapper
clearNode, clearNodeIfNoComments, getComment, getComment, getKeyTree, getNode, getOrAddNode, getPriorityNode, getRawComment, getRawComment, options, removeComment, removeComment, setComment, setFormattedComment, setRawCommentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.simpleyaml.configuration.comments.Commentable
getComment, setComment
-
Field Details
-
currentLine
-
trim
-
indent
protected int indent -
key
-
position
protected int position -
currentChar
protected char currentChar -
isEscaping
protected boolean isEscaping -
isLiteral
protected boolean isLiteral -
quoteNotation
-
beginExplicit
protected boolean beginExplicit -
explicitNotation
-
currentNode
-
currentList
-
isListElement
protected boolean isListElement -
stage
-
-
Constructor Details
-
YamlCommentReader
-
-
Method Details
-
readLine
- Throws:
IOException
-
nextLine
- Throws:
IOException
-
nextChar
protected boolean nextChar() -
hasChar
protected boolean hasChar() -
hasNext
protected boolean hasNext() -
peek
protected char peek(int offset) -
isBlank
protected boolean isBlank() -
isSpace
public static boolean isSpace(char c) -
isComment
protected boolean isComment() -
canStartComment
protected boolean canStartComment() -
isInQuote
protected boolean isInQuote() -
isExplicit
protected boolean isExplicit() -
endExplicitNotation
- Throws:
IOException
-
processLine
- Throws:
IOException
-
processMultiline
- Throws:
IOException
-
endExplicitBlock
- Throws:
IOException
-
isLiteralChar
protected boolean isLiteralChar() -
checkSpecialLines
- Throws:
IOException
-
checkSpecialChars
protected boolean checkSpecialChars() -
inQuote
-
isSectionKey
protected boolean isSectionKey() -
readTag
protected void readTag() -
readIndent
protected int readIndent(boolean special) -
readIndent
protected int readIndent() -
canStartSpecialIndent
protected boolean canStartSpecialIndent(int indent) -
isListChar
protected boolean isListChar() -
isExplicitChar
protected boolean isExplicitChar() -
nextIsSpace
protected final boolean nextIsSpace() -
isMultiline
protected final boolean isMultiline() -
hasKey
protected boolean hasKey() -
readKey
- Throws:
IOException
-
readKeyMultiline
- Throws:
IOException
-
readValue
- Throws:
IOException
-
readValueMultiline
- Throws:
IOException
-
skipToEnd
protected void skipToEnd() -
isSectionEnd
protected boolean isSectionEnd() -
track
- Throws:
IOException
-
trackListElement
protected void trackListElement() -
trackListElement
protected void trackListElement(int indent) -
trackExplicit
- Throws:
IOException
-
track
-
clearCurrentNode
protected void clearCurrentNode() -
clearCurrentNodeIfNoComments
protected void clearCurrentNodeIfNoComments() -
toString
-