Class Emitter

java.lang.Object
org.yaml.snakeyaml.emitter.Emitter
All Implemented Interfaces:
Emitable

public final class Emitter extends Object implements Emitable
 Emitter expects events obeying the following grammar:
 stream ::= STREAM-START document* STREAM-END
 document ::= DOCUMENT-START node DOCUMENT-END
 node ::= SCALAR | sequence | mapping
 sequence ::= SEQUENCE-START node* SEQUENCE-END
 mapping ::= MAPPING-START (node node)* MAPPING-END
 
  • Field Details

    • MIN_INDENT

      public static final int MIN_INDENT
      See Also:
    • MAX_INDENT

      public static final int MAX_INDENT
      See Also:
    • SPACE

      private static final char[] SPACE
    • SPACES_PATTERN

      private static final Pattern SPACES_PATTERN
    • INVALID_ANCHOR

      private static final Set<Character> INVALID_ANCHOR
    • ESCAPE_REPLACEMENTS

      private static final Map<Character,String> ESCAPE_REPLACEMENTS
    • DEFAULT_TAG_PREFIXES

      private static final Map<String,String> DEFAULT_TAG_PREFIXES
    • stream

      private final Writer stream
    • states

      private final ArrayStack<EmitterState> states
    • state

      private EmitterState state
    • events

      private final Queue<Event> events
    • event

      private Event event
    • indents

      private final ArrayStack<Integer> indents
    • indent

      private Integer indent
    • flowLevel

      private int flowLevel
    • rootContext

      private boolean rootContext
    • mappingContext

      private boolean mappingContext
    • simpleKeyContext

      private boolean simpleKeyContext
    • column

      private int column
    • whitespace

      private boolean whitespace
    • indention

      private boolean indention
    • openEnded

      private boolean openEnded
    • canonical

      private final Boolean canonical
    • prettyFlow

      private final Boolean prettyFlow
    • allowUnicode

      private final boolean allowUnicode
    • bestIndent

      private int bestIndent
    • indicatorIndent

      private final int indicatorIndent
    • indentWithIndicator

      private final boolean indentWithIndicator
    • bestWidth

      private int bestWidth
    • bestLineBreak

      private final char[] bestLineBreak
    • splitLines

      private final boolean splitLines
    • maxSimpleKeyLength

      private final int maxSimpleKeyLength
    • emitComments

      private final boolean emitComments
    • tagPrefixes

      private Map<String,String> tagPrefixes
    • preparedAnchor

      private String preparedAnchor
    • preparedTag

      private String preparedTag
    • analysis

      private ScalarAnalysis analysis
    • style

    • blockCommentsCollector

      private final CommentEventsCollector blockCommentsCollector
    • inlineCommentsCollector

      private final CommentEventsCollector inlineCommentsCollector
    • HANDLE_FORMAT

      private static final Pattern HANDLE_FORMAT
  • Constructor Details

  • Method Details