Package org.yaml.snakeyaml.composer
Class Composer
java.lang.Object
org.yaml.snakeyaml.composer.Composer
public class Composer
extends java.lang.Object
Creates a node graph from parser events.
Corresponds to the 'Compose' step as described in chapter 3.1 of the YAML Specification.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleancheckNode()Checks if further documents are available.protected NodecomposeKeyNode(MappingNode node)protected voidcomposeMappingChildren(java.util.List<NodeTuple> children, MappingNode node)protected NodecomposeMappingNode(java.lang.String anchor)protected NodecomposeScalarNode(java.lang.String anchor)protected NodecomposeSequenceNode(java.lang.String anchor)protected NodecomposeValueNode(MappingNode node)NodegetNode()Reads and composes the next document.NodegetSingleNode()Reads a document from a source that contains only one document.
-
Field Details
-
Constructor Details
-
Method Details
-
checkNode
public boolean checkNode()Checks if further documents are available.- Returns:
trueif there is at least one more document.
-
getNode
Reads and composes the next document.- Returns:
- The root node of the document or
nullif 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
nullif no document is available.
-
composeScalarNode
-
composeSequenceNode
-
composeMappingNode
-
composeMappingChildren
-
composeKeyNode
-
composeValueNode
-