Class YamlCommentDumper
java.lang.Object
org.simpleyaml.configuration.comments.YamlCommentMapper
org.simpleyaml.configuration.comments.YamlCommentReader
org.simpleyaml.configuration.comments.YamlCommentDumper
- All Implemented Interfaces:
Closeable,AutoCloseable,Commentable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.simpleyaml.configuration.comments.YamlCommentReader
YamlCommentReader.ReaderStage, YamlCommentReader.ReadingExplicitStyle, YamlCommentReader.ReadingQuoteStyle -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DumperBusprotected KeyTree.Nodeprotected KeyTree.Nodeprotected StringWriterprotected KeyTree.Nodeprotected StringWriterprotected BufferedWriterprotected final YamlCommentMapperFields inherited from class org.simpleyaml.configuration.comments.YamlCommentReader
beginExplicit, currentChar, currentLine, currentList, currentNode, explicitNotation, indent, isEscaping, isListElement, isLiteral, key, position, quoteNotation, stage, trimFields inherited from class org.simpleyaml.configuration.comments.YamlCommentMapper
keyTree, NO_COMMENTS -
Constructor Summary
ConstructorsConstructorDescriptionYamlCommentDumper(YamlCommentMapper yamlCommentMapper, DumperBus.Dumper source, Writer writer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidappendBlockComment(String comment) protected voidprotected voidappendSideCommentLiteral(String sideComment) protected voidcheckFirstListMapElement(KeyTree.Node commentNode, KeyTree.Node readerNode) protected voidvoidclose()voiddump()Merge comments from the comment mapper with lines from the source.voidgetCommentNode(KeyTree.Node readerNode) protected voidprotected voidprocessMultiline(boolean inQuoteBlock) protected voidreadKeyMultiline(StringBuilder keyBuilder) protected StringreadLine()protected voidprotected voidMethods inherited from class org.simpleyaml.configuration.comments.YamlCommentReader
canStartComment, canStartSpecialIndent, checkSpecialChars, checkSpecialLines, clearCurrentNode, clearCurrentNodeIfNoComments, endExplicitBlock, endExplicitNotation, hasChar, hasKey, hasNext, inQuote, isBlank, isComment, isExplicit, isExplicitChar, isInQuote, isListChar, isLiteralChar, isMultiline, isSectionEnd, isSectionKey, isSpace, nextChar, nextIsSpace, nextLine, peek, readIndent, readIndent, readKey, readTag, readValueMultiline, skipToEnd, toString, track, track, trackExplicit, trackListElement, trackListElementMethods inherited from class org.simpleyaml.configuration.comments.YamlCommentMapper
clearNode, clearNodeIfNoComments, getComment, getComment, getKeyTree, 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
-
yamlCommentMapper
-
bus
-
writer
-
explicitBlock
-
multilineKeyBlock
-
commentNode
-
commentNodeFallback
-
firstListMapElement
-
-
Constructor Details
-
YamlCommentDumper
public YamlCommentDumper(YamlCommentMapper yamlCommentMapper, DumperBus.Dumper source, Writer writer)
-
-
Method Details
-
dump
Merge comments from the comment mapper with lines from the source.The result is written to the writer.
- Throws:
IOException- if any problem arise while reading or writing
-
readLine
- Specified by:
readLinein classYamlCommentReader- Throws:
IOException
-
processLine
- Overrides:
processLinein classYamlCommentReader- Throws:
IOException
-
clearSection
protected void clearSection() -
getCommentNode
-
checkFirstListMapElement
-
getNode
- Overrides:
getNodein classYamlCommentMapper
-
appendBlockComment
- Throws:
IOException
-
appendBlockComment
- Throws:
IOException
-
appendSideComment
- Throws:
IOException
-
appendSideCommentLiteral
- Throws:
IOException
-
readValue
- Overrides:
readValuein classYamlCommentReader- Throws:
IOException
-
skipMultiline
- Throws:
IOException
-
readKeyMultiline
- Overrides:
readKeyMultilinein classYamlCommentReader- Throws:
IOException
-
processMultiline
- Overrides:
processMultilinein classYamlCommentReader- Throws:
IOException
-
close
- Throws:
IOException
-