Class NodeCursor
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonStreamContext
-
- com.fasterxml.jackson.databind.node.NodeCursor
-
- Direct Known Subclasses:
NodeCursor.ArrayCursor
,NodeCursor.ObjectCursor
,NodeCursor.RootCursor
abstract class NodeCursor extends com.fasterxml.jackson.core.JsonStreamContext
Helper class used byTreeTraversingParser
to keep track of current location within traversed JSON tree.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
NodeCursor.ArrayCursor
protected static class
NodeCursor.ObjectCursor
protected static class
NodeCursor.RootCursor
Context for all root-level value nodes (including Arrays and Objects): only context for scalar values.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_currentName
Current field nameprotected java.lang.Object
_currentValue
protected NodeCursor
_parent
Parent cursor of this cursor, if any; null for root cursors.
-
Constructor Summary
Constructors Constructor Description NodeCursor(int contextType, NodeCursor p)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract JsonNode
currentNode()
java.lang.String
getCurrentName()
java.lang.Object
getCurrentValue()
NodeCursor
getParent()
NodeCursor
iterateChildren()
Method called to create a new context for iterating all contents of the current structured value (JSON array or object)abstract com.fasterxml.jackson.core.JsonToken
nextToken()
void
overrideCurrentName(java.lang.String name)
void
setCurrentValue(java.lang.Object v)
abstract NodeCursor
startArray()
abstract NodeCursor
startObject()
-
-
-
Field Detail
-
_parent
protected final NodeCursor _parent
Parent cursor of this cursor, if any; null for root cursors.
-
_currentName
protected java.lang.String _currentName
Current field name
-
_currentValue
protected java.lang.Object _currentValue
- Since:
- 2.5
-
-
Constructor Detail
-
NodeCursor
public NodeCursor(int contextType, NodeCursor p)
-
-
Method Detail
-
getParent
public final NodeCursor getParent()
- Specified by:
getParent
in classcom.fasterxml.jackson.core.JsonStreamContext
-
getCurrentName
public final java.lang.String getCurrentName()
- Specified by:
getCurrentName
in classcom.fasterxml.jackson.core.JsonStreamContext
-
overrideCurrentName
public void overrideCurrentName(java.lang.String name)
- Since:
- 2.0
-
getCurrentValue
public java.lang.Object getCurrentValue()
- Overrides:
getCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
public void setCurrentValue(java.lang.Object v)
- Overrides:
setCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
nextToken
public abstract com.fasterxml.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)
-
-