Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.node

pack-priv abstract Class NodeCursor

extends JsonStreamContext
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.databind.node.NodeCursor.RootCursor, com.fasterxml.jackson.databind.node.NodeCursor.ArrayCursor, com.fasterxml.jackson.databind.node.NodeCursor.ObjectCursor
Imports
java.util.*, com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.JsonNode

Helper class used by TreeTraversingParser to keep track of current location within traversed JSON tree.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
protected static class
protected static class
NodeCursor.RootCursor

Context for all root-level value nodes (including Arrays and Objects): only context for scalar values.

Field Summary

Modifier and TypeField and Description
protected String
_currentName

Current field name

protected Object
protected final NodeCursor
_parent

Parent cursor of this cursor, if any; null for root cursors.

Inherited from com.fasterxml.jackson.core.JsonStreamContext:
_index_nestingDepth_typeTYPE_ARRAYTYPE_OBJECTTYPE_ROOT

Constructor Summary

AccessConstructor and Description
public
NodeCursor(int contextType, NodeCursor p)

Method Summary

Modifier and TypeMethod and Description
public abstract JsonNode
public final String
getCurrentName()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Method for accessing name associated with the current location.
public Object
getCurrentValue()

Overrides com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy.
public final NodeCursor
getParent()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getParent.

Accessor for finding parent context of this context; will return null for root context.
public final NodeCursor
iterateChildren()

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

public abstract JsonToken
public void
public void
setCurrentValue(Object
Current value to assign to this context
v
)

Overrides com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Method to call to pass value to be returned via getCurrentValue; typically called indirectly through JsonParser#setCurrentValue or JsonGenerator#setCurrentValue).
public abstract NodeCursor
public abstract NodeCursor
Inherited from com.fasterxml.jackson.core.JsonStreamContext:
getCurrentIndexgetEntryCountgetNestingDepthgetStartLocationgetTypeDeschasCurrentIndexhasCurrentNamehasPathSegmentinArrayinObjectinRootpathAsPointerpathAsPointerstartLocationtoStringtypeDesc

Field Detail

_currentNameback to summary
protected String _currentName

Current field name

_currentValueback to summary
protected Object _currentValue
Since
2.5
_parentback to summary
protected final NodeCursor _parent

Parent cursor of this cursor, if any; null for root cursors.

Constructor Detail

NodeCursorback to summary
public NodeCursor(int contextType, NodeCursor p)

Method Detail

currentNodeback to summary
public abstract JsonNode currentNode()
getCurrentNameback to summary
public final String getCurrentName()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Method for accessing name associated with the current location. Non-null for FIELD_NAME and value events that directly follow field names; null for root level and array values.

Returns:String

Current field name within context, if any; null if none

Annotations
@Override
getCurrentValueback to summary
public Object getCurrentValue()

Overrides com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy.

Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.

Returns:Object

Currently active value, if one has been assigned.

Annotations
@Override
getParentback to summary
public final NodeCursor getParent()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getParent.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getParent.

Accessor for finding parent context of this context; will return null for root context.

Returns:NodeCursor

Parent context of this context, if any; null for Root contexts

Annotations
@Override
iterateChildrenback to summary
public final NodeCursor iterateChildren()

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

nextTokenback to summary
public abstract JsonToken nextToken()
overrideCurrentNameback to summary
public void overrideCurrentName(String name)
Since
2.0
setCurrentValueback to summary
public void setCurrentValue(Object v)

Overrides com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Doc from com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Method to call to pass value to be returned via getCurrentValue; typically called indirectly through JsonParser#setCurrentValue or JsonGenerator#setCurrentValue).

Parameters
v:Object

Current value to assign to this context

Annotations
@Override
startArrayback to summary
public abstract NodeCursor startArray()
startObjectback to summary
public abstract NodeCursor startObject()
com.fasterxml.jackson.databind.node back to summary

protected final Class NodeCursor.ArrayCursor

extends NodeCursor
Class Inheritance

Field Summary

Modifier and TypeField and Description
protected Iterator<JsonNode>
protected JsonNode
Inherited from com.fasterxml.jackson.databind.node.NodeCursor:
_currentName_currentValue_parent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonNode
public JsonToken
public NodeCursor
public NodeCursor
Inherited from com.fasterxml.jackson.databind.node.NodeCursor:
getCurrentNamegetCurrentValuegetParentiterateChildrenoverrideCurrentNamesetCurrentValue

Field Detail

_contentsback to summary
protected Iterator<JsonNode> _contents
_currentElementback to summary
protected JsonNode _currentElement

Constructor Detail

ArrayCursorback to summary
public ArrayCursor(JsonNode n, NodeCursor p)

Method Detail

currentNodeback to summary
public JsonNode currentNode()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.currentNode.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.nextToken.

Annotations
@Override
startArrayback to summary
public NodeCursor startArray()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.startArray.

Annotations
@Override
startObjectback to summary
public NodeCursor startObject()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.startObject.

Annotations
@Override
com.fasterxml.jackson.databind.node back to summary

protected final Class NodeCursor.ObjectCursor

extends NodeCursor
Class Inheritance

Field Summary

Modifier and TypeField and Description
protected Iterator<Map.Entry<String, JsonNode>>
protected Map.Entry<String, JsonNode>
protected boolean
Inherited from com.fasterxml.jackson.databind.node.NodeCursor:
_currentName_currentValue_parent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonNode
public JsonToken
public NodeCursor
public NodeCursor
Inherited from com.fasterxml.jackson.databind.node.NodeCursor:
getCurrentNamegetCurrentValuegetParentiterateChildrenoverrideCurrentNamesetCurrentValue

Field Detail

_contentsback to summary
protected Iterator<Map.Entry<String, JsonNode>> _contents
_currentback to summary
protected Map.Entry<String, JsonNode> _current
_needEntryback to summary
protected boolean _needEntry

Constructor Detail

ObjectCursorback to summary
public ObjectCursor(JsonNode n, NodeCursor p)

Method Detail

currentNodeback to summary
public JsonNode currentNode()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.currentNode.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.nextToken.

Annotations
@Override
startArrayback to summary
public NodeCursor startArray()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.startArray.

Annotations
@Override
startObjectback to summary
public NodeCursor startObject()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.startObject.

Annotations
@Override
com.fasterxml.jackson.databind.node back to summary

protected final Class NodeCursor.RootCursor

extends NodeCursor
Class Inheritance

Context for all root-level value nodes (including Arrays and Objects): only context for scalar values.

Field Summary

Modifier and TypeField and Description
protected boolean
protected JsonNode
Inherited from com.fasterxml.jackson.databind.node.NodeCursor:
_currentName_currentValue_parent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonNode
public JsonToken
public void
public NodeCursor
public NodeCursor
Inherited from com.fasterxml.jackson.databind.node.NodeCursor:
getCurrentNamegetCurrentValuegetParentiterateChildrensetCurrentValue

Field Detail

_doneback to summary
protected boolean _done
_nodeback to summary
protected JsonNode _node

Constructor Detail

RootCursorback to summary
public RootCursor(JsonNode n, NodeCursor p)

Method Detail

currentNodeback to summary
public JsonNode currentNode()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.currentNode.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.nextToken.

Annotations
@Override
overrideCurrentNameback to summary
public void overrideCurrentName(String name)

Overrides com.fasterxml.jackson.databind.node.NodeCursor.overrideCurrentName.

Annotations
@Override
startArrayback to summary
public NodeCursor startArray()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.startArray.

Annotations
@Override
startObjectback to summary
public NodeCursor startObject()

Implements abstract com.fasterxml.jackson.databind.node.NodeCursor.startObject.

Annotations
@Override