Top Description Inners Fields Constructors Methods
tools.jackson.databind.node

pack-priv abstract Class NodeCursor

extends TokenStreamContext
Class Inheritance
Known Direct Subclasses
tools.jackson.databind.node.NodeCursor.RootCursor, tools.jackson.databind.node.NodeCursor.ArrayCursor, tools.jackson.databind.node.NodeCursor.ObjectCursor
Imports
java.util.*, tools.jackson.core.*, tools.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 tools.jackson.core.TokenStreamContext:
_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 void
assignCurrentValue(Object v)

Overrides tools.jackson.core.TokenStreamContext.assignCurrentValue.

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

public final String
currentName()

Implements abstract tools.jackson.core.TokenStreamContext.currentName.

Method for accessing name associated with the current location.

public abstract JsonNode
public Object
currentValue()

Overrides tools.jackson.core.TokenStreamContext.currentValue.

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 tools.jackson.core.TokenStreamContext.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 abstract NodeCursor
public abstract NodeCursor
Inherited from tools.jackson.core.TokenStreamContext:
getCurrentIndexgetEntryCountgetNestingDepthhasCurrentIndexhasCurrentNamehasPathSegmentinArrayinObjectinRootpathAsPointerpathAsPointerstartLocationtoStringtypeDesc

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

assignCurrentValueback to summary
public void assignCurrentValue(Object v)

Overrides tools.jackson.core.TokenStreamContext.assignCurrentValue.

Doc from tools.jackson.core.TokenStreamContext.assignCurrentValue.

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

Annotations
@Override
currentNameback to summary
public final String currentName()

Implements abstract tools.jackson.core.TokenStreamContext.currentName.

Doc from tools.jackson.core.TokenStreamContext.currentName.

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

Annotations
@Override
currentNodeback to summary
public abstract JsonNode currentNode()
currentValueback to summary
public Object currentValue()

Overrides tools.jackson.core.TokenStreamContext.currentValue.

Doc from tools.jackson.core.TokenStreamContext.currentValue.

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.

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

Implements abstract tools.jackson.core.TokenStreamContext.getParent.

Doc from tools.jackson.core.TokenStreamContext.getParent.

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

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)
startArrayback to summary
public abstract NodeCursor startArray()
startObjectback to summary
public abstract NodeCursor startObject()
tools.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 tools.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 tools.jackson.databind.node.NodeCursor:
assignCurrentValuecurrentNamecurrentValuegetParentiterateChildrenoverrideCurrentName

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 tools.jackson.databind.node.NodeCursor.currentNode.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract tools.jackson.databind.node.NodeCursor.nextToken.

Annotations
@Override
startArrayback to summary
public NodeCursor startArray()

Implements abstract tools.jackson.databind.node.NodeCursor.startArray.

Annotations
@Override
startObjectback to summary
public NodeCursor startObject()

Implements abstract tools.jackson.databind.node.NodeCursor.startObject.

Annotations
@Override
tools.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 tools.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 tools.jackson.databind.node.NodeCursor:
assignCurrentValuecurrentNamecurrentValuegetParentiterateChildrenoverrideCurrentName

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 tools.jackson.databind.node.NodeCursor.currentNode.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract tools.jackson.databind.node.NodeCursor.nextToken.

Annotations
@Override
startArrayback to summary
public NodeCursor startArray()

Implements abstract tools.jackson.databind.node.NodeCursor.startArray.

Annotations
@Override
startObjectback to summary
public NodeCursor startObject()

Implements abstract tools.jackson.databind.node.NodeCursor.startObject.

Annotations
@Override
tools.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 tools.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 tools.jackson.databind.node.NodeCursor:
assignCurrentValuecurrentNamecurrentValuegetParentiterateChildren

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 tools.jackson.databind.node.NodeCursor.currentNode.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract tools.jackson.databind.node.NodeCursor.nextToken.

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

Overrides tools.jackson.databind.node.NodeCursor.overrideCurrentName.

Annotations
@Override
startArrayback to summary
public NodeCursor startArray()

Implements abstract tools.jackson.databind.node.NodeCursor.startArray.

Annotations
@Override
startObjectback to summary
public NodeCursor startObject()

Implements abstract tools.jackson.databind.node.NodeCursor.startObject.

Annotations
@Override