Package org.codehaus.jackson.impl
Class JsonReadContext
java.lang.Object
org.codehaus.jackson.JsonStreamContext
org.codehaus.jackson.impl.JsonReadContext
Extension of
JsonStreamContext
, which implements
core methods needed, and also exposes
more complete API to parser implementation classes.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JsonReadContext
protected int
protected String
protected int
protected final JsonReadContext
Fields inherited from class org.codehaus.jackson.JsonStreamContext
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal JsonReadContext
createChildArrayContext
(int lineNr, int colNr) final JsonReadContext
createChildObjectContext
(int lineNr, int colNr) static JsonReadContext
static JsonReadContext
createRootContext
(int lineNr, int colNr) final boolean
final String
Method for accessing name associated with the current location.final JsonReadContext
Accessor for finding parent context of this context; will return null for root context.final JsonLocation
getStartLocation
(Object srcRef) protected final void
reset
(int type, int lineNr, int colNr) void
setCurrentName
(String name) final String
toString()
Overridden to provide developer readable "JsonPath" representation of the context.Methods inherited from class org.codehaus.jackson.JsonStreamContext
getCurrentIndex, getEntryCount, getTypeDesc, inArray, inObject, inRoot
-
Field Details
-
_parent
-
_lineNr
protected int _lineNr -
_columnNr
protected int _columnNr -
_currentName
-
_child
-
-
Constructor Details
-
JsonReadContext
-
-
Method Details
-
reset
protected final void reset(int type, int lineNr, int colNr) -
createRootContext
-
createRootContext
- Since:
- 1.9
-
createChildArrayContext
-
createChildObjectContext
-
getCurrentName
Description copied from class:JsonStreamContext
Method for accessing name associated with the current location. Non-null forFIELD_NAME
and value events that directly follow field names; null for root level and array values.- Specified by:
getCurrentName
in classJsonStreamContext
-
getParent
Description copied from class:JsonStreamContext
Accessor for finding parent context of this context; will return null for root context.- Specified by:
getParent
in classJsonStreamContext
-
getStartLocation
- Returns:
- Location pointing to the point where the context start marker was found
-
expectComma
public final boolean expectComma() -
setCurrentName
-
toString
Overridden to provide developer readable "JsonPath" representation of the context.
-