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,org.simpleyaml.configuration.comments.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 org.simpleyaml.utils.DumperBusprotected org.simpleyaml.configuration.comments.KeyTree.Nodeprotected org.simpleyaml.configuration.comments.KeyTree.Nodeprotected StringWriterprotected org.simpleyaml.configuration.comments.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, org.simpleyaml.utils.DumperBus.Dumper source, Writer writer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidappendBlockComment(String comment) protected voidprotected voidappendSideCommentLiteral(String sideComment) protected voidcheckFirstListMapElement(org.simpleyaml.configuration.comments.KeyTree.Node commentNode, org.simpleyaml.configuration.comments.KeyTree.Node readerNode) protected voidvoidclose()voiddump()Merge comments from the comment mapper with lines from the source.voidgetCommentNode(org.simpleyaml.configuration.comments.KeyTree.Node readerNode) org.simpleyaml.configuration.comments.KeyTree.Nodeprotected 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
protected final org.simpleyaml.utils.DumperBus bus -
writer
-
explicitBlock
-
multilineKeyBlock
-
commentNode
protected org.simpleyaml.configuration.comments.KeyTree.Node commentNode -
commentNodeFallback
protected org.simpleyaml.configuration.comments.KeyTree.Node commentNodeFallback -
firstListMapElement
protected org.simpleyaml.configuration.comments.KeyTree.Node firstListMapElement
-
-
Constructor Details
-
YamlCommentDumper
public YamlCommentDumper(YamlCommentMapper yamlCommentMapper, org.simpleyaml.utils.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
public void getCommentNode(org.simpleyaml.configuration.comments.KeyTree.Node readerNode) -
checkFirstListMapElement
protected void checkFirstListMapElement(org.simpleyaml.configuration.comments.KeyTree.Node commentNode, org.simpleyaml.configuration.comments.KeyTree.Node readerNode) -
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
-