Package org.snakeyaml.engine.v2.composer
Class Composer
- java.lang.Object
-
- org.snakeyaml.engine.v2.composer.Composer
-
-
Constructor Summary
Constructors Constructor Description Composer(LoadSettings settings, Parser parser)Composer(Parser parser, LoadSettings settings)Deprecated.use the other constructor with LoadSettings first
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NodecomposeKeyNode(MappingNode node, List<CommentLine> blockComments)protected voidcomposeMappingChildren(List<NodeTuple> children, MappingNode node, List<CommentLine> keyBlockComments)protected NodecomposeMappingNode(Optional<Anchor> anchor, List<CommentLine> blockComments)protected NodecomposeScalarNode(Optional<Anchor> anchor, List<CommentLine> blockComments)protected NodecomposeSequenceNode(Optional<Anchor> anchor, List<CommentLine> blockComments)protected NodecomposeValueNode(MappingNode node, List<CommentLine> blockComments)Optional<Node>getSingleNode()Reads a document from a source that contains only one document.booleanhasNext()Checks if further documents are available.Nodenext()Reads and composes the next document.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
parser
protected final Parser parser
-
-
Constructor Detail
-
Composer
public Composer(Parser parser, LoadSettings settings)
Deprecated.use the other constructor with LoadSettings first
-
Composer
public Composer(LoadSettings settings, Parser parser)
-
-
Method Detail
-
hasNext
public boolean hasNext()
Checks if further documents are available.
-
getSingleNode
public Optional<Node> 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
Optional.empty()if no document is available.
-
next
public Node next()
Reads and composes the next document.
-
composeScalarNode
protected Node composeScalarNode(Optional<Anchor> anchor, List<CommentLine> blockComments)
-
composeSequenceNode
protected Node composeSequenceNode(Optional<Anchor> anchor, List<CommentLine> blockComments)
-
composeMappingNode
protected Node composeMappingNode(Optional<Anchor> anchor, List<CommentLine> blockComments)
-
composeMappingChildren
protected void composeMappingChildren(List<NodeTuple> children, MappingNode node, List<CommentLine> keyBlockComments)
-
composeKeyNode
protected Node composeKeyNode(MappingNode node, List<CommentLine> blockComments)
-
composeValueNode
protected Node composeValueNode(MappingNode node, List<CommentLine> blockComments)
-
-