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 JsonReadContextprotected intprotected Stringprotected intprotected final JsonReadContextFields inherited from class org.codehaus.jackson.JsonStreamContext
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal JsonReadContextcreateChildArrayContext(int lineNr, int colNr) final JsonReadContextcreateChildObjectContext(int lineNr, int colNr) static JsonReadContextstatic JsonReadContextcreateRootContext(int lineNr, int colNr) final booleanfinal StringMethod for accessing name associated with the current location.final JsonReadContextAccessor for finding parent context of this context; will return null for root context.final JsonLocationgetStartLocation(Object srcRef) protected final voidreset(int type, int lineNr, int colNr) voidsetCurrentName(String name) final StringtoString()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:JsonStreamContextMethod for accessing name associated with the current location. Non-null forFIELD_NAMEand value events that directly follow field names; null for root level and array values.- Specified by:
getCurrentNamein classJsonStreamContext
-
getParent
Description copied from class:JsonStreamContextAccessor for finding parent context of this context; will return null for root context.- Specified by:
getParentin 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.
-