Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.dataformat.javaprop.io

public abstract Class JPropReadContext

extends JsonStreamContext
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext.ArrayContext, com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext.ObjectContext
Imports
java.util.*, com.fasterxml.jackson.core.*, com.fasterxml.jackson.dataformat.javaprop.util.JPropNode

Helper class used to keep track of traversal over contents of content tree expressed as JPropNodes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
JPropReadContext.ArrayContext

Cursor used for traversing non-empty JSON Array nodes

protected static class
JPropReadContext.ObjectContext

Cursor used for traversing non-empty JSON Object nodes

Field Summary

Modifier and TypeField and Description
protected String
_branchText

Optional "this" value for cases where path branches have direct values; these are exposed before child values with bogus 'name' of empty String.

protected String
_currentName

Current field name

protected String
protected Object
_currentValue

Java-level Object that corresponds to this level of input hierarchy, if any; used by databinding functionality, opaque for parser.

protected JPropNode
_nextNode

We need to keep track of value nodes to construct further contexts.

protected final JPropReadContext
_parent

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

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

Constructor Summary

AccessConstructor and Description
public
JPropReadContext(int contextType, JPropReadContext p, JPropNode node)

Method Summary

Modifier and TypeMethod and Description
public static JPropReadContext
public final String
getCurrentName()

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

Method for accessing name associated with the current location.

public String
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 JPropReadContext
getParent()

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

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

public JPropReadContext
nextContext()

Method called to figure out child or parent context when change is needed, as indicated by this context returning `null`.

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

_branchTextback to summary
protected String _branchText

Optional "this" value for cases where path branches have direct values; these are exposed before child values with bogus 'name' of empty String.

_currentNameback to summary
protected String _currentName

Current field name

_currentTextback to summary
protected String _currentText
_currentValueback to summary
protected Object _currentValue

Java-level Object that corresponds to this level of input hierarchy, if any; used by databinding functionality, opaque for parser.

_nextNodeback to summary
protected JPropNode _nextNode

We need to keep track of value nodes to construct further contexts.

_parentback to summary
protected final JPropReadContext _parent

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

_stateback to summary
protected int _state

Constructor Detail

JPropReadContextback to summary
public JPropReadContext(int contextType, JPropReadContext p, JPropNode node)

Method Detail

createback to summary
public static JPropReadContext create(JPropNode root)
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
getCurrentTextback to summary
public String getCurrentText()
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 JPropReadContext 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:JPropReadContext

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

Annotations
@Override
nextContextback to summary
public JPropReadContext nextContext()

Method called to figure out child or parent context when change is needed, as indicated by this context returning `null`.

nextTokenback to summary
public abstract JsonToken nextToken()
overrideCurrentNameback to summary
public void overrideCurrentName(String name)
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.dataformat.javaprop.io back to summary

protected final Class JPropReadContext.ArrayContext

extends JPropReadContext
Class Inheritance

Cursor used for traversing non-empty JSON Array nodes

Field Summary

Modifier and TypeField and Description
protected Iterator<JPropNode>
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
Inherited from com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext:
_branchText_currentName_currentText_currentValue_nextNode_parent_state

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonToken
Inherited from com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext:
creategetCurrentNamegetCurrentTextgetCurrentValuegetParentnextContextoverrideCurrentNamesetCurrentValue

Field Detail

_contentsback to summary
protected Iterator<JPropNode> _contents
STATE_BRANCH_VALUEback to summary
pack-priv static final int STATE_BRANCH_VALUE
STATE_CONTENT_VALUEback to summary
pack-priv static final int STATE_CONTENT_VALUE
STATE_ENDback to summary
pack-priv static final int STATE_END
STATE_STARTback to summary
pack-priv static final int STATE_START

Constructor Detail

ArrayContextback to summary
public ArrayContext(JPropReadContext p, JPropNode arrayNode)

Method Detail

nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext.nextToken.

Annotations
@Override
com.fasterxml.jackson.dataformat.javaprop.io back to summary

protected final Class JPropReadContext.ObjectContext

extends JPropReadContext
Class Inheritance

Cursor used for traversing non-empty JSON Object nodes

Field Summary

Modifier and TypeField and Description
protected Iterator<Map.Entry<String, JPropNode>>
_contents

Iterator over child values.

pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
Inherited from com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext:
_branchText_currentName_currentText_currentValue_nextNode_parent_state

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonToken
Inherited from com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext:
creategetCurrentNamegetCurrentTextgetCurrentValuegetParentnextContextoverrideCurrentNamesetCurrentValue

Field Detail

_contentsback to summary
protected Iterator<Map.Entry<String, JPropNode>> _contents

Iterator over child values.

STATE_BRANCH_KEYback to summary
pack-priv static final int STATE_BRANCH_KEY
STATE_BRANCH_VALUEback to summary
pack-priv static final int STATE_BRANCH_VALUE
STATE_CONTENT_KEYback to summary
pack-priv static final int STATE_CONTENT_KEY
STATE_CONTENT_VALUEback to summary
pack-priv static final int STATE_CONTENT_VALUE
STATE_ENDback to summary
pack-priv static final int STATE_END
STATE_STARTback to summary
pack-priv static final int STATE_START

Constructor Detail

ObjectContextback to summary
public ObjectContext(JPropReadContext p, JPropNode objectNode)

Method Detail

nextTokenback to summary
public JsonToken nextToken()

Implements abstract com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext.nextToken.

Annotations
@Override