Class NodeCursor

java.lang.Object
tools.jackson.core.TokenStreamContext
tools.jackson.databind.node.NodeCursor
Direct Known Subclasses:
NodeCursor.ArrayCursor, NodeCursor.ObjectCursor, NodeCursor.RootCursor

abstract class NodeCursor extends tools.jackson.core.TokenStreamContext
Helper class used by TreeTraversingParser to keep track of current location within traversed JSON tree.
  • Field Details

    • _parent

      protected final NodeCursor _parent
      Parent cursor of this cursor, if any; null for root cursors.
    • _currentName

      protected String _currentName
      Current field name
    • _currentValue

      protected Object _currentValue
      Since:
      2.5
  • Constructor Details

    • NodeCursor

      public NodeCursor(int contextType, NodeCursor p)
  • Method Details

    • getParent

      public final NodeCursor getParent()
      Specified by:
      getParent in class tools.jackson.core.TokenStreamContext
    • currentName

      public final String currentName()
      Specified by:
      currentName in class tools.jackson.core.TokenStreamContext
    • overrideCurrentName

      public void overrideCurrentName(String name)
    • currentValue

      public Object currentValue()
      Overrides:
      currentValue in class tools.jackson.core.TokenStreamContext
    • assignCurrentValue

      public void assignCurrentValue(Object v)
      Overrides:
      assignCurrentValue in class tools.jackson.core.TokenStreamContext
    • nextToken

      public abstract tools.jackson.core.JsonToken nextToken()
    • currentNode

      public abstract JsonNode currentNode()
    • startObject

      public abstract NodeCursor startObject()
    • startArray

      public abstract NodeCursor startArray()
    • iterateChildren

      public final NodeCursor iterateChildren()
      Method called to create a new context for iterating all contents of the current structured value (JSON array or object)