Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.jr.stree.util

pack-priv abstract Class JrsValueCursor

extends JsonStreamContext
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.jr.stree.util.JrsValueCursor.RootCursor, com.fasterxml.jackson.jr.stree.util.JrsValueCursor.ArrayCursor, com.fasterxml.jackson.jr.stree.util.JrsValueCursor.ObjectCursor
Imports
java.util.*, com.fasterxml.jackson.core.*, com.fasterxml.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 com.fasterxml.jackson.core.JsonStreamContext:
_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 abstract boolean
public abstract JrsValue
public abstract JsonToken
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 JrsValueCursor
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 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
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).

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 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

currentHasChildrenback to summary
public abstract boolean currentHasChildren()
currentNodeback to summary
public abstract JrsValue currentNode()
endTokenback to summary
public abstract JsonToken endToken()
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 JrsValueCursor 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:JrsValueCursor

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

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()
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
com.fasterxml.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 com.fasterxml.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 com.fasterxml.jackson.jr.stree.util.JrsValueCursor:
getCurrentNamegetCurrentValuegetParentiterateChildrenoverrideCurrentNamesetCurrentValue

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 com.fasterxml.jackson.jr.stree.util.JrsValueCursor.currentHasChildren.

Annotations
@Override
currentNodeback to summary
public JrsValue currentNode()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.currentNode.

Annotations
@Override
endTokenback to summary
public JsonToken endToken()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.endToken.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.nextToken.

Annotations
@Override
nextValueback to summary
public JsonToken nextValue()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.nextValue.

Annotations
@Override
com.fasterxml.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 com.fasterxml.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 com.fasterxml.jackson.jr.stree.util.JrsValueCursor:
getCurrentNamegetCurrentValuegetParentiterateChildrenoverrideCurrentNamesetCurrentValue

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 com.fasterxml.jackson.jr.stree.util.JrsValueCursor.currentHasChildren.

Annotations
@Override
currentNodeback to summary
public JrsValue currentNode()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.currentNode.

Annotations
@Override
endTokenback to summary
public JsonToken endToken()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.endToken.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.nextToken.

Annotations
@Override
nextValueback to summary
public JsonToken nextValue()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.nextValue.

Annotations
@Override
com.fasterxml.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 com.fasterxml.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
public void
Inherited from com.fasterxml.jackson.jr.stree.util.JrsValueCursor:
getCurrentNamegetCurrentValuegetParentiterateChildrensetCurrentValue

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 com.fasterxml.jackson.jr.stree.util.JrsValueCursor.currentHasChildren.

Annotations
@Override
currentNodeback to summary
public JrsValue currentNode()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.currentNode.

Annotations
@Override
endTokenback to summary
public JsonToken endToken()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.endToken.

Annotations
@Override
nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.nextToken.

Annotations
@Override
nextValueback to summary
public JsonToken nextValue()

Implements abstract com.fasterxml.jackson.jr.stree.util.JrsValueCursor.nextValue.

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

Overrides com.fasterxml.jackson.jr.stree.util.JrsValueCursor.overrideCurrentName.

Annotations
@Override