Package org.yaml.snakeyaml.composer
Class Composer
java.lang.Object
org.yaml.snakeyaml.composer.Composer
Creates a node graph from parser events.
Corresponds to the 'Compose' step as described in chapter 3.1 of the YAML Specification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoaderOptions
private int
protected final Parser
private final Resolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if further documents are available.protected Node
composeKeyNode
(MappingNode node) protected void
composeMappingChildren
(List<NodeTuple> children, MappingNode node) protected Node
composeMappingNode
(String anchor) private Node
composeNode
(Node parent) protected Node
composeScalarNode
(String anchor) protected Node
composeSequenceNode
(String anchor) protected Node
composeValueNode
(MappingNode node) getNode()
Reads and composes the next document.Reads a document from a source that contains only one document.
-
Field Details
-
parser
-
resolver
-
anchors
-
recursiveNodes
-
nonScalarAliasesCount
private int nonScalarAliasesCount -
loadingConfig
-
-
Constructor Details
-
Composer
-
Composer
-
-
Method Details
-
checkNode
public boolean checkNode()Checks if further documents are available.- Returns:
true
if there is at least one more document.
-
getNode
Reads and composes the next document.- Returns:
- The root node of the document or
null
if no more documents are available.
-
getSingleNode
Reads a document from a source that contains only one document.If the stream contains more than one document an exception is thrown.
- Returns:
- The root node of the document or
null
if no document is available.
-
composeNode
-
composeScalarNode
-
composeSequenceNode
-
composeMappingNode
-
composeMappingChildren
-
composeKeyNode
-
composeValueNode
-