org.yaml.snakeyaml.composer

## Class Composer

- java.lang.Object
- - org.yaml.snakeyaml.composer.Composer

    public class Composer
    extends 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

Fields
`protected Parser` `parser`

### Constructor Summary

Constructors
Constructor and Description
`Composer(Parser parser, Resolver resolver)`
`Composer(Parser parser, Resolver resolver, LoaderOptions loadingConfig)`

### Method Summary

Methods
`boolean` `checkNode()` Checks if further documents are available.
`protected Node` `composeKeyNode(MappingNode node)`
`protected void` `composeMappingChildren(List<NodeTuple> children, MappingNode node)`
`protected Node` `composeMappingNode(String anchor)`
`protected Node` `composeScalarNode(String anchor, List<CommentLine> blockComments)`
`protected Node` `composeSequenceNode(String anchor)`
`protected Node` `composeValueNode(MappingNode node)`
`Node` `getNode()` Reads and composes the next document.
`Node` `getSingleNode()` Reads a document from a source that contains only one document.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### parser

    protected final Parser parser

### Constructor Detail

#### Composer

    public Composer(Parser parser,
            Resolver resolver)

#### Composer

    public Composer(Parser parser,
            Resolver resolver,
            LoaderOptions loadingConfig)

### Method Detail

#### checkNode

    public boolean checkNode()

Checks if further documents are available.

Returns:
  `true` if there is at least one more document.

#### getNode

    public Node getNode()

Reads and composes the next document.

Returns:
  The root node of the document or `null` if no more documents are available.

#### getSingleNode

    public 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 `null` if no document is available.

#### composeScalarNode

    protected Node composeScalarNode(String anchor,
                         List<CommentLine> blockComments)

#### composeSequenceNode

    protected Node composeSequenceNode(String anchor)

#### composeMappingNode

    protected Node composeMappingNode(String anchor)

#### composeMappingChildren

    protected void composeMappingChildren(List<NodeTuple> children,
                              MappingNode node)

#### composeKeyNode

    protected Node composeKeyNode(MappingNode node)

#### composeValueNode

    protected Node composeValueNode(MappingNode node)