Package org.snakeyaml.engine.v2.events
Class DocumentStartEvent
java.lang.Object
org.snakeyaml.engine.v2.events.Event
org.snakeyaml.engine.v2.events.DocumentStartEvent
Marks the beginning of a document.
This event followed by the document's content and a DocumentEndEvent
.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDocumentStartEvent
(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags) DocumentStartEvent
(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags, Optional<Mark> startMark, Optional<Mark> endMark) -
Method Summary
Methods inherited from class org.snakeyaml.engine.v2.events.Event
getEndMark, getStartMark
-
Field Details
-
explicit
private final boolean explicit -
specVersion
-
tags
-
-
Constructor Details
-
DocumentStartEvent
-
DocumentStartEvent
public DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags)
-
-
Method Details
-
isExplicit
public boolean isExplicit() -
getSpecVersion
- Returns:
- YAML version the document conforms to.
-
getTags
Tag shorthands as defined by the%TAG
directive.- Returns:
- Mapping of 'handles' to 'prefixes' (the handles include the '!' characters).
-
getEventId
Description copied from class:Event
Get the type (kind) if this Event- Specified by:
getEventId
in classEvent
- Returns:
- the ID of this Event
-
toString
-