Class ConfigDocument
Reading. The text is composed with SnakeYAML's node API using the options Bukkit's
YamlConfiguration uses (aliases and code points unlimited, nesting depth 100) with comment
processing on. Values are constructed with a SafeConstructor, so a global tag such as
!!java.util.UUID is refused, and a map key's identity is String.valueOf of its
constructed value, exactly the rule Bukkit's YamlConfiguration#fromNodeTree applies:
yes: is the key "true", 1: the key "1"; a duplicate key's last value
wins; merge keys (<<) are flattened. Unlike Bukkit, a key is never split at .:
"o.O" and wave. are single keys. A key's original node is kept, so it is written back with
its original text. Values YAML itself types outside plain data (a timestamp reads as a
java.util.Date, !!binary as a byte[], !!set as a Set) are
returned as they are; the binding layer reports them.
Writing. set(List, Object) accepts plain data only (see PlainData) and changes
only what differs: an equal value keeps its node, a changed map is merged key by key, a
same-size list element by element, a changed string keeps its quote style, and every replaced node keeps
its comments. render() serializes the whole node tree through SnakeYAML, preserving content,
comments and document style; the rendering itself may normalize operator spacing. Comments on individual
list items are kept only while the list keeps its length - the same as Bukkit, which keeps none.
A document holding an anchor, an alias
or a merge key is re-rendered from its plain data once changed (every value equal, anchors expanded, the
comments of keys that still exist carried over), as Bukkit renders every file.
No caller publishes a rendering as it is: every write to a configuration file goes through
OperatorFileWriter, which refuses a rendering that would change any byte outside the keys the write
owns (so normalized spacing or an expanded anchor is never written) and never writes an anchored file.
Comments. SnakeYAML attaches a comment to the node after it. Two placements are adjusted when the
file is read, without changing the rendered text: the file header (the comment lines before the first
key, up to the last blank line among them, Bukkit's own rule) belongs to the document rather than to the
first key; and a comment indented deeper than the key it precedes is the trailing comment of the
previous section, and is kept there. The framework writes a comment only through
setFrameworkComment(List, List).
Instances are not thread-safe; the entity that owns a document confines it.
- Since:
- 6.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classOne comment line to re-indent: where the reader found it, and what must be there for the move to apply.private static final classThe two comment placements adjusted on read (see the class description).private static final classA section left with no value that aset(java.util.List<java.lang.String>, java.lang.Object)made a section again, and the comment lines indented under it.(package private) static final classASafeConstructorthat constructs single nodes and flattens merge keys on request.private static final classBuilds the plain-data view of a composed tree with Bukkit's key and value rules.private static final classBuilds new nodes for plain values. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final List<ConfigDocument.Expansion> Sections left with no value that this document made sections again, with the comment lines indented under them.private final ConfigDocument.NodeConstructorprivate boolean(package private) static final intBukkit'sYamlConfigurationnesting limit, kept for compatibility.private org.yaml.snakeyaml.nodes.MappingNodeprivate final Stringprivate final DocumentStyleprivate static final Patternprivate static final Pattern -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConfigDocument(String source, org.yaml.snakeyaml.nodes.MappingNode root, Map<String, Object> plain, DocumentStyle style, boolean anchored) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidappendMappingEnds(org.yaml.snakeyaml.nodes.MappingNode mapping, List<org.yaml.snakeyaml.comments.CommentLine> ends) blockComment(List<String> path) Returns the comment lines directly above the key atpath: each line's text after#with one leading space removed, andnullfor a blank line.blockCommentAsWritten(List<String> path) Returns the comment lines directly above the key atpathin the byte form they are written in: for a line at the key's own column,"#"followed by everything after the#up to the line break (a framework line reads"# " + text, or"#"for an empty line);nullfor a blank line.private static voidcarryComments(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to) private static voidcarryPresentation(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to) private static booleanWhether dropping the emitted text's final line break (a file without one keeps that style) would change a value: only a block scalar running to the end of the document can be changed, e.g.private org.yaml.snakeyaml.nodes.MappingNodechildMapping(org.yaml.snakeyaml.nodes.MappingNode mapping, String key, Object child) childPlainMapping(Map<String, Object> mapping, String key) private static voidclaimCommentOccurrences(org.yaml.snakeyaml.nodes.Node node, Set<org.yaml.snakeyaml.nodes.Node> seen, Set<org.yaml.snakeyaml.comments.CommentLine> claimed) An expanded alias may carry the same physical comment object to several fresh nodes.private static voidcollectDescendantEnds(org.yaml.snakeyaml.nodes.Node node, List<org.yaml.snakeyaml.comments.CommentLine> ends, Set<org.yaml.snakeyaml.nodes.Node> seen) private static voidcollectEnds(org.yaml.snakeyaml.nodes.Node node, List<org.yaml.snakeyaml.comments.CommentLine> ends, Set<org.yaml.snakeyaml.nodes.Node> seen) private static voidcollectReadings(Object node, String[] parts, int from, List<String> prefix, List<List<String>> found) private static org.yaml.snakeyaml.nodes.NodebooleanReturns whether the file holds a value (possiblynull) atpath.private static booleancontainsSame(List<org.yaml.snakeyaml.comments.CommentLine> lines, org.yaml.snakeyaml.comments.CommentLine line) private static org.yaml.snakeyaml.DumperOptionsdumperOptions(DocumentStyle style) private static Stringemit(org.yaml.snakeyaml.nodes.Node out, DocumentStyle style) The emitter's text forout, comments realigned and whitespace-only lines emptied.static ConfigDocumentempty()Returns an empty document, as for a file that does not exist yet, in the default style.private org.yaml.snakeyaml.nodes.Nodeprivate org.yaml.snakeyaml.nodes.MappingNodefindMapping(List<String> path) The mapping node holding the last key ofpath, ornull.findPlainMapping(List<String> path) private static List<org.yaml.snakeyaml.comments.CommentLine> frameworkLines(List<String> lines) The comment lines the framework writes forlines: split at YAML line breaks, made printable.Returns the plain value atpath, ornullwhen the path is absent (usecontains(List)to tell an absent key from an explicitnull).private static booleanhasAnchors(org.yaml.snakeyaml.nodes.Node node, Set<org.yaml.snakeyaml.nodes.Node> seen) heldSections(String dottedPath) Where a declared setting this document does not hold belongs (#614): the readings (readings(String)) of the longest proper prefix ofdottedPaththat this document holds as a section - a mapping, or a key with no value.private static booleanholdsAsValue(org.yaml.snakeyaml.nodes.MappingNode parent, org.yaml.snakeyaml.nodes.Node value) private intIndex of the last tuple whose key identity equalskey(the last duplicate wins, as on read).private static booleanisBlockCollection(org.yaml.snakeyaml.nodes.Node node) private StringkeyIdentity(org.yaml.snakeyaml.nodes.Node keyNode) static ConfigLoadResultReads a config file.(package private) static ConfigLoadResultload(Path file, AtomicConfigWriter.FileOperations files) (package private) static org.yaml.snakeyaml.LoaderOptionsprivate static ConfigLoadResultloadLocked(Path file, AtomicConfigWriter.FileOperations files) private void(package private) static StringmoveComments(String text, List<ConfigDocument.CommentMove> moves) Re-indents comment lines oftext; every other character is copied unchanged.private static voidmoveInLineCommentsToKey(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node key) private org.yaml.snakeyaml.nodes.Node(package private) static StringnormalizeEscapes(String text, boolean upper, boolean latin1AsU) Rewrites the escapes inside every double-quoted scalar into the file's own form:\xHHas\u00HHwhenlatin1AsU, and hex digits in upper case whenupper.private static org.yaml.snakeyaml.nodes.NodenormalizeMultilineStrings(org.yaml.snakeyaml.nodes.Node node, Map<org.yaml.snakeyaml.nodes.Node, org.yaml.snakeyaml.nodes.Node> normalized, boolean preserveNoEof) Escapes preserve NEL (which the scanner normalizes) and no-EOF multiline string content.static ConfigDocumentParses a config file's text.For a render only: moves each recorded run of comment lines indented under an expanded section to the end of the section's last value - where the reader puts such lines once the section holds keys, and where the emitter writes them at the section's own indentation, byte for byte as the operator wrote them when their column is that one - and returns how to undo it, so the document's comments stay as read (the write gate's comment ownership is computed on them).private static voidprependEnds(org.yaml.snakeyaml.nodes.Node recipient, List<org.yaml.snakeyaml.comments.CommentLine> ends) private static StringKeeps the characters YAML allows in a stream (the YAML 1.1 printable set, tab included).private static List<int[]> readerLines(String text) Each line's {start, end of content} intext, with SnakeYAML's reader's line breaks.Returns every place this document holds a declared setting path: each way of splittingdottedPathat its dots into keys the document holds, the last one present (an explicitnullincluded).readings(String)over a plain-data tree, such as a copy of a document taken at load.private static StringrealignCommentsAfterBlankLines(String text, List<org.yaml.snakeyaml.events.Event> events) Puts back every comment line SnakeYAML's emitter misplaces after a blank line (17-64 review round 1 R1-01, route change (i)).private voidrecordExpansion(List<org.yaml.snakeyaml.nodes.MappingNode> parents, List<String> keys, org.yaml.snakeyaml.nodes.MappingNode section) Records a section left with no value that this document made a section again (keysis its key path,parentsthe mappings holding each of those keys, from the top level), together with the comment lines indented under its line in the file - the lines a commented-out child leaves (#620).booleanRemoves the key atpathtogether with its own comment lines.private static voidremoveTuples(org.yaml.snakeyaml.nodes.MappingNode mapping, Predicate<org.yaml.snakeyaml.nodes.NodeTuple> removed) Every tuple deletion uses the same post-order preservation of section end comments.render()Serializes the document in the file's own style.private StringrenderFrom(org.yaml.snakeyaml.nodes.MappingNode out) voidreplaceFrameworkComment(List<String> path, int owned, List<String> lines) Replaces only the lastownedcomment lines of the key atpath- the run the framework identified as its own comment - withlines, rendered and sanitized exactly assetFrameworkComment(List, List)renders them.private static org.yaml.snakeyaml.representer.Representerprivate static voidrequireKeys(List<String> path) private org.yaml.snakeyaml.nodes.MappingNodeprivate static voidretainDescendantEnds(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to) private static booleansameComments(List<org.yaml.snakeyaml.comments.CommentLine> a, List<org.yaml.snakeyaml.comments.CommentLine> b) private static List<org.yaml.snakeyaml.events.Event> serialize(org.yaml.snakeyaml.nodes.Node out, Writer writer, DocumentStyle style) Serializesoutexactly asYaml#serialize(Node, Writer)does (the sameSerializer,Emitter, options and resolver), recording every event the emitter receives, so the comment lines it writes can be located afterwards by position (17-64 route change (i)).voidStores a plain value atpath, creating missing mappings on the way.voidsetFrameworkComment(List<String> path, List<String> lines) Replaces the comment of the key atpath- the only way the framework writes a comment.private voidsetHeldComments(org.yaml.snakeyaml.nodes.Node holder, List<org.yaml.snakeyaml.comments.CommentLine> lines) (package private) static Stringsha256(byte[] bytes) private static booleanstartsWithSame(List<org.yaml.snakeyaml.comments.CommentLine> lines, List<org.yaml.snakeyaml.comments.CommentLine> prefix) toPlain()Returns a copy of the whole document as plain data, in file order.private voidtransplantComments(org.yaml.snakeyaml.nodes.MappingNode from, org.yaml.snakeyaml.nodes.MappingNode to, Set<org.yaml.snakeyaml.nodes.Node> retained) private voidtransplantNode(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to, Set<org.yaml.snakeyaml.nodes.Node> retained) Carries all comment positions and the collection presentation that makes them emit correctly.private static List<org.yaml.snakeyaml.comments.CommentLine> unclaimedComments(List<org.yaml.snakeyaml.comments.CommentLine> comments, Set<org.yaml.snakeyaml.comments.CommentLine> claimed) private org.yaml.snakeyaml.nodes.Node(package private) static booleanwrittenWithNoValue(org.yaml.snakeyaml.nodes.Node value) Whether the operator wrote no value at all for the key holdingvalue: nothing after the colon but, at most, a comment.
-
Field Details
-
NESTING_DEPTH_LIMIT
static final int NESTING_DEPTH_LIMITBukkit'sYamlConfigurationnesting limit, kept for compatibility.- See Also:
-
YAML_LINE_BREAK
-
WHITESPACE_ONLY_LINE
-
style
-
anchored
private final boolean anchored -
source
-
plain
-
keyConstructor
-
root
private org.yaml.snakeyaml.nodes.MappingNode root -
modified
private boolean modified -
expansions
Sections left with no value that this document made sections again, with the comment lines indented under them.
-
-
Constructor Details
-
ConfigDocument
private ConfigDocument(String source, org.yaml.snakeyaml.nodes.MappingNode root, Map<String, Object> plain, DocumentStyle style, boolean anchored)
-
-
Method Details
-
empty
Returns an empty document, as for a file that does not exist yet, in the default style.- Returns:
- a document without keys
-
parse
Parses a config file's text.- Parameters:
text- the file's content- Returns:
- the document
- Throws:
ConfigParseException- if the text is not valid YAML, holds a tag this layer does not construct, is deeper than the nesting limit, or its top level is not a mapping
-
load
Reads a config file. Never throws: the result isABSENT,LOADED(with the document and the SHA-256 of the bytes read),UNREADABLE(with the I/O failure) orUNPARSEABLE(with the parser's message). Temporary files an interrupted write left beside the file are deleted first (seeAtomicConfigWriter).- Parameters:
file- the config file- Returns:
- what was found
-
load
-
loadLocked
-
get
Returns the plain value atpath, ornullwhen the path is absent (usecontains(List)to tell an absent key from an explicitnull).- Parameters:
path- the key path, one element per mapping level- Returns:
- a copy of the value
-
contains
Returns whether the file holds a value (possiblynull) atpath.- Parameters:
path- the key path- Returns:
- whether the path is present
-
readings
Returns every place this document holds a declared setting path: each way of splittingdottedPathat its dots into keys the document holds, the last one present (an explicitnullincluded).a.b.cis read asa -> b -> c,a.b -> c,a -> b.cor the single keya.b.c, the way Bukkit'sYamlConfiguration- which splits every key at its dots - reads the same file, so a setting the operator wrote as a flat dotted key is that setting (#612). Keys inside the setting's value are not split: this addresses the setting itself, never an entry of a map it holds.- Parameters:
dottedPath- a declared setting path, such asfeatures.chat- Returns:
- the readings found, nested forms first; empty when the document does not hold the setting, two or more when it holds it in several forms
- Since:
- 6.3.0
-
readings
readings(String)over a plain-data tree, such as a copy of a document taken at load.- Parameters:
tree- the top-level mappingdottedPath- a declared setting path- Returns:
- the readings found, nested forms first
- Since:
- 6.3.0
-
heldSections
Where a declared setting this document does not hold belongs (#614): the readings (readings(String)) of the longest proper prefix ofdottedPaththat this document holds as a section - a mapping, or a key with no value. An insert goes below one of them, the rest of the path as nested keys, so a section the operator wrote in flat dotted form (a.b:) gets the setting in place and never a second, nested copy (a: b:), which Bukkit'sYamlConfigurationwould read as replacing the first. Each returned path joins with.to the same prefix.- Parameters:
dottedPath- a declared setting path- Returns:
- the section readings of the longest held prefix, nested forms first; empty when no prefix is held as a section; two or more when the document holds that section in several forms
- Since:
- 6.3.0
-
collectReadings
-
toPlain
Returns a copy of the whole document as plain data, in file order.- Returns:
- the top-level mapping
-
set
Stores a plain value atpath, creating missing mappings on the way. A value equal to the current one (seePlainData.plainEquals(java.lang.Object, java.lang.Object)) changes nothing.- Parameters:
path- the key path, at least one keyvalue- plain data;nullis stored as an explicit YAMLnull- Throws:
IllegalArgumentException- ifvalueis not plain data (the message names the key path and the class), the path is empty, or the path and value together nest deeper than the 100 levels a load accepts
-
remove
Removes the key atpathtogether with its own comment lines.- Parameters:
path- the key path- Returns:
- whether a key was removed
-
blockComment
Returns the comment lines directly above the key atpath: each line's text after#with one leading space removed, andnullfor a blank line. The file header is not part of the first key's comment.- Parameters:
path- the key path- Returns:
- the lines, empty when the key has no comment or does not exist
-
blockCommentAsWritten
Returns the comment lines directly above the key atpathin the byte form they are written in: for a line at the key's own column,"#"followed by everything after the#up to the line break (a framework line reads"# " + text, or"#"for an empty line);nullfor a blank line. A line at any other column is reported as"@<offset>|#...", which never equals a line the framework writes, since the framework writes a key's comment at the key's column. A line added in memory (it has no position yet) is reported as it will be written. The file header is not part of the first key's comment.The framework identifies its own comment lines on this form (17-64 review round 1 R1-02): a line holding the framework's text in any other byte form was written by an operator.
- Parameters:
path- the key path- Returns:
- the lines, empty when the key has no comment or does not exist
-
setFrameworkComment
Replaces the comment of the key atpath- the only way the framework writes a comment. Blank lines directly above the comment are kept; the comment lines themselves are replaced bylines. Each line is split at every YAML line break (\r\n,\r,\n, U+0085, U+2028, U+2029) and characters YAML does not allow in a stream are dropped; anullline is a blank line.- Parameters:
path- the key path of an existing keylines- the new comment text, one element per line (an empty list removes the comment)- Throws:
IllegalArgumentException- if no key exists atpath
-
replaceFrameworkComment
Replaces only the lastownedcomment lines of the key atpath- the run the framework identified as its own comment - withlines, rendered and sanitized exactly assetFrameworkComment(List, List)renders them. Withownedzero the lines are appended below the key's existing comment.Why it cannot change an operator line. Every comment line above the run - an operator's note, a blank line, a framework comment the operator edited - is kept as the same comment object, in the same order, so it renders byte for byte as before; only the run's own lines are dropped. The run may not include a blank line and may not reach above the key's comment, so it can never take in a line the caller did not identify (maintainer decision 2026-10-04, "only the framework's own comments are rewritten", #604).
- Parameters:
path- the key path of an existing keyowned- how many of the key's last comment lines are the framework's (0 for none)lines- the new framework comment text, one element per line- Throws:
IllegalArgumentException- if no key exists atpath, or the run is negative, longer than the key's comment, or includes a blank line
-
frameworkLines
The comment lines the framework writes forlines: split at YAML line breaks, made printable. -
render
Serializes the document in the file's own style.- Returns:
- the file text
-
renderFrom
-
emit
The emitter's text forout, comments realigned and whitespace-only lines emptied. -
changedByMissingFinalLineBreak
Whether dropping the emitted text's final line break (a file without one keeps that style) would change a value: only a block scalar running to the end of the document can be changed, e.g.|ending a file whose last value ends with a line break. Then every multi-line string is written double-quoted instead (the #592 measurement's adjacent finding: quoting every block scalar of such a file whenever it is written changed bytes no write owned, so the write gate refused every write to it). -
serialize
private static List<org.yaml.snakeyaml.events.Event> serialize(org.yaml.snakeyaml.nodes.Node out, Writer writer, DocumentStyle style) Serializesoutexactly asYaml#serialize(Node, Writer)does (the sameSerializer,Emitter, options and resolver), recording every event the emitter receives, so the comment lines it writes can be located afterwards by position (17-64 route change (i)).- Returns:
- the events, in the order the emitter wrote them
-
realignCommentsAfterBlankLines
private static String realignCommentsAfterBlankLines(String text, List<org.yaml.snakeyaml.events.Event> events) Puts back every comment line SnakeYAML's emitter misplaces after a blank line (17-64 review round 1 R1-01, route change (i)). The emitter (Emitter#writeCommentLines, SnakeYAML 2.2) writes the first comment line after a blank line of a comment run at its current indentation plus the run's own column again - doubled indentation in a nested block - and every other line of the run at the run's column.Nothing is injected into the document's text: the lines are located by position. The comment events the emitter received (in order, each carrying its original line's position) are matched one to one with the comment events of the emitted text read back; when the two sequences differ in length, type or text (a blank line matches a blank line by type: in memory its text is empty, read back it is the line break), the emitted text is returned unchanged. Each misplaced line - a comment line right after a blank line, with an earlier comment line in the same run - is written at its own original column, or, for a line added in memory (it has no position), at the column of the run's first comment line as emitted. Lines are located with the reader's own line numbering (
moveComments(java.lang.String, java.util.List<com.ultikits.ultitools.config.document.ConfigDocument.CommentMove>)), and every move is checked before any is applied, so a misalignment leaves the output as emitted (review round 3). -
moveComments
Re-indents comment lines oftext; every other character is copied unchanged. Lines are counted exactly as SnakeYAML's reader counts them -\r\n,\r,\n, U+0085, U+2028, U+2029 each end a line (review round 3 R3-01: the emitter writes U+2028 and U+2029 raw inside a value). Before any line is changed every move is checked: its line must hold, at the expected column, exactly#plus its comment, with only spaces before it; when one move fails the check,textis returned as it is, so a misalignment can never move a line it did not mean (review round 3 self-check).- Parameters:
text- the emitted textmoves- the lines to re-indent- Returns:
- the realigned text, or
textunchanged
-
readerLines
Each line's {start, end of content} intext, with SnakeYAML's reader's line breaks. -
normalizeMultilineStrings
private static org.yaml.snakeyaml.nodes.Node normalizeMultilineStrings(org.yaml.snakeyaml.nodes.Node node, Map<org.yaml.snakeyaml.nodes.Node, org.yaml.snakeyaml.nodes.Node> normalized, boolean preserveNoEof) Escapes preserve NEL (which the scanner normalizes) and no-EOF multiline string content. -
carryPresentation
private static void carryPresentation(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to) -
update
-
merge
-
newNode
-
childMapping
-
writtenWithNoValue
static boolean writtenWithNoValue(org.yaml.snakeyaml.nodes.Node value) Whether the operator wrote no value at all for the key holdingvalue: nothing after the colon but, at most, a comment. That is an empty plainnullscalar without a token of its own, so its start and end marks coincide. A null written as~ornullin any case, or with a tag (!!null,!<tag:yaml.org,2002:null>,!!null ''), is the operator's explicit value (maintainer decision 2026-10-06). A node built in memory has no marks and was not written by anyone, so it is not "no value" either.The one answer to this question for the write gate (
OperatorFileWriter, which expands only a key with no value, #620) and for this document's own comment handling (set(java.util.List<java.lang.String>, java.lang.Object),merge,childMapping): gate-1 F1 of plan 17-75 found the two had separate predicates that disagreed on!!null.- Parameters:
value- a value node of a parsed document- Returns:
- whether the operator wrote no value for it
-
moveInLineCommentsToKey
private static void moveInLineCommentsToKey(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node key) -
isBlockCollection
private static boolean isBlockCollection(org.yaml.snakeyaml.nodes.Node node) -
recordExpansion
private void recordExpansion(List<org.yaml.snakeyaml.nodes.MappingNode> parents, List<String> keys, org.yaml.snakeyaml.nodes.MappingNode section) Records a section left with no value that this document made a section again (keysis its key path,parentsthe mappings holding each of those keys, from the top level), together with the comment lines indented under its line in the file - the lines a commented-out child leaves (#620). The reader attached them, as SnakeYAML does, to the next key in the file (or to the end of the document), where an unchanged render writes them at that key's column; they are the leading block comment lines of that key that start below the section line and at a column deeper than the section key. -
placeExpansionComments
For a render only: moves each recorded run of comment lines indented under an expanded section to the end of the section's last value - where the reader puts such lines once the section holds keys, and where the emitter writes them at the section's own indentation, byte for byte as the operator wrote them when their column is that one - and returns how to undo it, so the document's comments stay as read (the write gate's comment ownership is computed on them). A run is moved only while the section is still in the tree, holds keys, and the next key still starts with exactly those lines. -
setHeldComments
private void setHeldComments(org.yaml.snakeyaml.nodes.Node holder, List<org.yaml.snakeyaml.comments.CommentLine> lines) -
holdsAsValue
private static boolean holdsAsValue(org.yaml.snakeyaml.nodes.MappingNode parent, org.yaml.snakeyaml.nodes.Node value) -
startsWithSame
-
containsSame
private static boolean containsSame(List<org.yaml.snakeyaml.comments.CommentLine> lines, org.yaml.snakeyaml.comments.CommentLine line) -
childPlainMapping
-
findMapping
The mapping node holding the last key ofpath, ornull. -
findPlainMapping
-
findKey
-
indexOf
Index of the last tuple whose key identity equalskey(the last duplicate wins, as on read). -
keyIdentity
-
reRenderFromPlain
private org.yaml.snakeyaml.nodes.MappingNode reRenderFromPlain() -
transplantNode
private void transplantNode(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to, Set<org.yaml.snakeyaml.nodes.Node> retained) Carries all comment positions and the collection presentation that makes them emit correctly. -
transplantComments
private void transplantComments(org.yaml.snakeyaml.nodes.MappingNode from, org.yaml.snakeyaml.nodes.MappingNode to, Set<org.yaml.snakeyaml.nodes.Node> retained) -
removeTuples
private static void removeTuples(org.yaml.snakeyaml.nodes.MappingNode mapping, Predicate<org.yaml.snakeyaml.nodes.NodeTuple> removed) Every tuple deletion uses the same post-order preservation of section end comments. -
retainDescendantEnds
private static void retainDescendantEnds(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to) -
collectDescendantEnds
-
collectEnds
-
appendMappingEnds
private static void appendMappingEnds(org.yaml.snakeyaml.nodes.MappingNode mapping, List<org.yaml.snakeyaml.comments.CommentLine> ends) -
prependEnds
private static void prependEnds(org.yaml.snakeyaml.nodes.Node recipient, List<org.yaml.snakeyaml.comments.CommentLine> ends) -
claimCommentOccurrences
private static void claimCommentOccurrences(org.yaml.snakeyaml.nodes.Node node, Set<org.yaml.snakeyaml.nodes.Node> seen, Set<org.yaml.snakeyaml.comments.CommentLine> claimed) An expanded alias may carry the same physical comment object to several fresh nodes. -
unclaimedComments
-
sameComments
-
carryComments
private static void carryComments(org.yaml.snakeyaml.nodes.Node from, org.yaml.snakeyaml.nodes.Node to) -
requireKeys
-
hasAnchors
private static boolean hasAnchors(org.yaml.snakeyaml.nodes.Node node, Set<org.yaml.snakeyaml.nodes.Node> seen) -
printable
Keeps the characters YAML allows in a stream (the YAML 1.1 printable set, tab included). -
normalizeEscapes
Rewrites the escapes inside every double-quoted scalar into the file's own form:\xHHas\u00HHwhenlatin1AsU, and hex digits in upper case whenupper. -
sha256
-
compose
- Throws:
ConfigParseException
-
loaderOptions
static org.yaml.snakeyaml.LoaderOptions loaderOptions() -
representer
private static org.yaml.snakeyaml.representer.Representer representer() -
dumperOptions
-