public class Composer extends Object
Corresponds to the 'Compose' step as described in chapter 3.1 of the YAML Specification.
Constructor and Description |
---|
Composer(Parser parser,
Resolver resolver)
Deprecated.
use options
|
Composer(Parser parser,
Resolver resolver,
LoaderOptions loadingConfig)
Create
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkNode()
Checks if further documents are available.
|
protected Node |
composeKeyNode(MappingNode node)
To be able to override composeNode(node) which is a key
|
protected void |
composeMappingChildren(List<NodeTuple> children,
MappingNode node)
Compose the members of mapping
|
protected Node |
composeMappingNode(String anchor) |
protected Node |
composeScalarNode(String anchor,
List<CommentLine> blockComments) |
protected Node |
composeSequenceNode(String anchor) |
protected Node |
composeValueNode(MappingNode node)
To be able to override composeNode(node) which is a value
|
Node |
getNode()
Reads and composes the next document.
|
Node |
getSingleNode()
Reads a document from a source that contains only one document.
|
protected final Parser parser
@Deprecated public Composer(Parser parser, Resolver resolver)
parser
- - the parserresolver
- - the resolverpublic Composer(Parser parser, Resolver resolver, LoaderOptions loadingConfig)
parser
- - the parserresolver
- - the resolverloadingConfig
- - optionspublic boolean checkNode()
true
if there is at least one more document.public Node getNode()
null
if no more documents are available.public Node getSingleNode()
If the stream contains more than one document an exception is thrown.
null
if no document is available.protected Node composeScalarNode(String anchor, List<CommentLine> blockComments)
protected void composeMappingChildren(List<NodeTuple> children, MappingNode node)
children
- - the data to fillnode
- - the sourceprotected Node composeKeyNode(MappingNode node)
node
- - the sourceprotected Node composeValueNode(MappingNode node)
node
- - the sourceCopyright © 2008–2022. All rights reserved.