public class YamlCommentDumper extends YamlCommentReader
YamlCommentReader.ReaderStage, YamlCommentReader.ReadingExplicitStyle, YamlCommentReader.ReadingQuoteStyle
Modifier and Type | Field and Description |
---|---|
protected org.simpleyaml.utils.DumperBus |
bus |
protected org.simpleyaml.configuration.comments.KeyTree.Node |
commentNode |
protected org.simpleyaml.configuration.comments.KeyTree.Node |
commentNodeFallback |
protected StringWriter |
explicitBlock |
protected org.simpleyaml.configuration.comments.KeyTree.Node |
firstListMapElement |
protected BufferedWriter |
writer |
protected YamlCommentMapper |
yamlCommentMapper |
beginExplicit, currentChar, currentLine, currentList, currentNode, explicitNotation, indent, isEscaping, isListElement, isLiteral, key, position, quoteNotation, stage, trim
keyTree, NO_COMMENTS
Constructor and Description |
---|
YamlCommentDumper(YamlCommentMapper yamlCommentMapper,
org.simpleyaml.utils.DumperBus.Dumper source,
Writer writer) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendBlockComment() |
protected void |
appendBlockComment(String comment) |
protected void |
appendSideComment() |
protected void |
appendSideCommentLiteral(String sideComment) |
protected void |
checkFirstListMapElement(org.simpleyaml.configuration.comments.KeyTree.Node commentNode,
org.simpleyaml.configuration.comments.KeyTree.Node readerNode) |
protected void |
clearSection() |
void |
close() |
void |
dump()
Merge comments from the comment mapper with lines from the source.
|
void |
getCommentNode(org.simpleyaml.configuration.comments.KeyTree.Node readerNode) |
org.simpleyaml.configuration.comments.KeyTree.Node |
getNode(String path) |
protected void |
processLine() |
protected void |
processMultiline(boolean inQuoteBlock) |
protected String |
readLine() |
protected void |
readValue() |
protected void |
skipMultiline() |
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, readKeyMultiline, readTag, readValueMultiline, skipToEnd, toString, track, track, trackExplicit, trackListElement
clearNode, clearNodeIfNoComments, getComment, getComment, getKeyTree, getOrAddNode, getPriorityNode, getRawComment, getRawComment, options, removeComment, removeComment, setComment, setFormattedComment, setRawComment
protected final YamlCommentMapper yamlCommentMapper
protected final org.simpleyaml.utils.DumperBus bus
protected BufferedWriter writer
protected StringWriter explicitBlock
protected org.simpleyaml.configuration.comments.KeyTree.Node commentNode
protected org.simpleyaml.configuration.comments.KeyTree.Node commentNodeFallback
protected org.simpleyaml.configuration.comments.KeyTree.Node firstListMapElement
public YamlCommentDumper(YamlCommentMapper yamlCommentMapper, org.simpleyaml.utils.DumperBus.Dumper source, Writer writer)
public void dump() throws IOException
The result is written to the writer.
IOException
- if any problem arise while reading or writingprotected String readLine() throws IOException
readLine
in class YamlCommentReader
IOException
protected void processLine() throws IOException
processLine
in class YamlCommentReader
IOException
protected void clearSection()
public void getCommentNode(org.simpleyaml.configuration.comments.KeyTree.Node readerNode)
protected void checkFirstListMapElement(org.simpleyaml.configuration.comments.KeyTree.Node commentNode, org.simpleyaml.configuration.comments.KeyTree.Node readerNode)
public org.simpleyaml.configuration.comments.KeyTree.Node getNode(String path)
getNode
in class YamlCommentMapper
protected void appendBlockComment() throws IOException
IOException
protected void appendBlockComment(String comment) throws IOException
IOException
protected void appendSideComment() throws IOException
IOException
protected void appendSideCommentLiteral(String sideComment) throws IOException
IOException
protected void readValue() throws IOException
readValue
in class YamlCommentReader
IOException
protected void skipMultiline() throws IOException
IOException
protected void processMultiline(boolean inQuoteBlock) throws IOException
processMultiline
in class YamlCommentReader
IOException
public void close() throws IOException
IOException
Copyright © 2023. All rights reserved.