Class NodeEvent

java.lang.Object
org.yaml.snakeyaml.events.Event
org.yaml.snakeyaml.events.NodeEvent
Direct Known Subclasses:
AliasEvent, CollectionStartEvent, ScalarEvent

public abstract class NodeEvent
extends Event
Base class for all events that mark the beginning of a node.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.yaml.snakeyaml.events.Event

    Event.ID
  • Constructor Summary

    Constructors 
    Constructor Description
    NodeEvent​(java.lang.String anchor, Mark startMark, Mark endMark)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getAnchor()
    Node anchor by which this node might later be referenced by a AliasEvent.
    protected java.lang.String getArguments()
    Generate human readable representation of the Event

    Methods inherited from class org.yaml.snakeyaml.events.Event

    equals, getEndMark, getEventId, getStartMark, hashCode, is, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NodeEvent

      public NodeEvent​(java.lang.String anchor, Mark startMark, Mark endMark)
  • Method Details

    • getAnchor

      public java.lang.String getAnchor()
      Node anchor by which this node might later be referenced by a AliasEvent.

      Note that AliasEvents are by it self NodeEvents and use this property to indicate the referenced anchor.

      Returns:
      Anchor of this node or null if no anchor is defined.
    • getArguments

      protected java.lang.String getArguments()
      Description copied from class: Event
      Generate human readable representation of the Event
      Overrides:
      getArguments in class Event
      Returns:
      representation fore humans
      See Also:
      "__repr__ for Event in PyYAML"