Top Description Inners Fields Constructors Methods
tools.jackson.jr.stree.util

pack-priv abstract Class JrsValueCursor

extends TokenStreamContext
Class Inheritance
Known Direct Subclasses
tools.jackson.jr.stree.util.JrsValueCursor.RootCursor, tools.jackson.jr.stree.util.JrsValueCursor.ArrayCursor, tools.jackson.jr.stree.util.JrsValueCursor.ObjectCursor
Imports
java.util.*, tools.jackson.core.*, tools.jackson.jr.stree.JrsArray, .JrsObject, .JrsValue

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
JrsValueCursor.ArrayCursor

Cursor used for traversing non-empty JSON Array nodes

protected static class
JrsValueCursor.ObjectCursor

Cursor used for traversing non-empty JSON Object nodes

protected static class
JrsValueCursor.RootCursor

Context matching root-level value nodes (i.e. anything other than JSON Object and Array).

Field Summary

Modifier and TypeField and Description
protected String
_currentName

Current field name

protected Object
protected final JrsValueCursor
_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
JrsValueCursor(int contextType, JrsValueCursor 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 abstract boolean
public final String
currentName()

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

Method for accessing name associated with the current location.

public abstract JrsValue
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 abstract JsonToken
public final JrsValueCursor
getParent()

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

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

public final JrsValueCursor
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 abstract JsonToken
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 JrsValueCursor _parent

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

Constructor Detail

JrsValueCursorback to summary
public JrsValueCursor(int contextType, JrsValueCursor 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
currentHasChildrenback to summary
public abstract boolean currentHasChildren()
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 JrsValue 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
endTokenback to summary
public abstract JsonToken endToken()
getParentback to summary
public final JrsValueCursor 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 JrsValueCursor 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()
nextValueback to summary
public abstract JsonToken nextValue()
tools.jackson.jr.stree.util back to summary

protected final Class JrsValueCursor.ArrayCursor

extends JrsValueCursor
Class Inheritance

Cursor used for traversing non-empty JSON Array nodes

Field Summary

Modifier and TypeField and Description
protected Iterator<JrsValue>
protected JrsValue
Inherited from tools.jackson.jr.stree.util.JrsValueCursor:
_currentName_currentValue_parent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public JrsValue
public JsonToken
public JsonToken
public JsonToken
Inherited from tools.jackson.jr.stree.util.JrsValueCursor:
assignCurrentValuecurrentNamecurrentValuegetParentiterateChildren

Field Detail

_contentsback to summary
protected Iterator<JrsValue> _contents
_currentNodeback to summary
protected JrsValue _currentNode

Constructor Detail

ArrayCursorback to summary
public ArrayCursor(JrsArray n, JrsValueCursor p)

Method Detail

currentHasChildrenback to summary
public boolean currentHasChildren()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.currentHasChildren.

Annotations
@Override
currentNodeback to summary
public JrsValue currentNode()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.currentNode.

Annotations
@Override
endTokenback to summary
public JsonToken endToken()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.endToken.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.nextToken.

Annotations
@Override
nextValueback to summary
public JsonToken nextValue()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.nextValue.

Annotations
@Override
tools.jackson.jr.stree.util back to summary

protected final Class JrsValueCursor.ObjectCursor

extends JrsValueCursor
Class Inheritance

Cursor used for traversing non-empty JSON Object nodes

Field Summary

Modifier and TypeField and Description
protected Iterator<Map.Entry<String, JrsValue>>
protected Map.Entry<String, JrsValue>
protected boolean
Inherited from tools.jackson.jr.stree.util.JrsValueCursor:
_currentName_currentValue_parent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public JrsValue
public JsonToken
public JsonToken
public JsonToken
Inherited from tools.jackson.jr.stree.util.JrsValueCursor:
assignCurrentValuecurrentNamecurrentValuegetParentiterateChildren

Field Detail

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

Constructor Detail

ObjectCursorback to summary
public ObjectCursor(JrsValue n, JrsValueCursor p)

Method Detail

currentHasChildrenback to summary
public boolean currentHasChildren()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.currentHasChildren.

Annotations
@Override
currentNodeback to summary
public JrsValue currentNode()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.currentNode.

Annotations
@Override
endTokenback to summary
public JsonToken endToken()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.endToken.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.nextToken.

Annotations
@Override
nextValueback to summary
public JsonToken nextValue()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.nextValue.

Annotations
@Override
tools.jackson.jr.stree.util back to summary

protected final Class JrsValueCursor.RootCursor

extends JrsValueCursor
Class Inheritance

Context matching root-level value nodes (i.e. anything other than JSON Object and Array). Note that context is NOT created for leaf values.

Field Summary

Modifier and TypeField and Description
protected boolean
protected JrsValue
Inherited from tools.jackson.jr.stree.util.JrsValueCursor:
_currentName_currentValue_parent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public JrsValue
public JsonToken
public JsonToken
public JsonToken
Inherited from tools.jackson.jr.stree.util.JrsValueCursor:
assignCurrentValuecurrentNamecurrentValuegetParentiterateChildren

Field Detail

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

Constructor Detail

RootCursorback to summary
public RootCursor(JrsValue n, JrsValueCursor p)

Method Detail

currentHasChildrenback to summary
public boolean currentHasChildren()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.currentHasChildren.

Annotations
@Override
currentNodeback to summary
public JrsValue currentNode()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.currentNode.

Annotations
@Override
endTokenback to summary
public JsonToken endToken()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.endToken.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.nextToken.

Annotations
@Override
nextValueback to summary
public JsonToken nextValue()

Implements abstract tools.jackson.jr.stree.util.JrsValueCursor.nextValue.

Annotations
@Override