Class XmlReadContext
java.lang.Object
com.fasterxml.jackson.core.JsonStreamContext
com.fasterxml.jackson.dataformat.xml.deser.XmlReadContext
public final class XmlReadContext
extends com.fasterxml.jackson.core.JsonStreamContext
Extension of
JsonStreamContext
, which implements
core methods needed, and adds small amount of additional
state data we need.
Almost same as standard JsonReaderContext
, but
custom version needed to be able to keep track of names
of properties that need wrapping; this is needed to
support wrapped/unwrapped Collection/array values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XmlReadContext
protected int
protected String
protected Object
protected int
protected final XmlReadContext
protected String
Name of property that requires wrappingFields inherited from class com.fasterxml.jackson.core.JsonStreamContext
_index, _nestingDepth, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
final XmlReadContext
createChildArrayContext
(int lineNr, int colNr) final XmlReadContext
createChildObjectContext
(int lineNr, int colNr) static XmlReadContext
static XmlReadContext
createRootContext
(int lineNr, int colNr) final String
final XmlReadContext
boolean
protected final void
reset
(int type, int lineNr, int colNr) void
setCurrentName
(String name) void
void
setNamesToWrap
(Set<String> namesToWrap) boolean
shouldWrap
(String localName) final com.fasterxml.jackson.core.JsonLocation
startLocation
(com.fasterxml.jackson.core.io.ContentReference srcRef) final String
toString()
Overridden to provide developer readable "JsonPath" representation of the context.final void
Method called to mark start of new value, mostly to update `index` for Array and Root contexts.Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext
getCurrentIndex, getEntryCount, getNestingDepth, getStartLocation, getTypeDesc, hasCurrentIndex, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, typeDesc
-
Field Details
-
_parent
-
_lineNr
protected int _lineNr -
_columnNr
protected int _columnNr -
_currentName
-
_currentValue
- Since:
- 2.9
-
_namesToWrap
-
_wrappedName
Name of property that requires wrapping -
_child
-
-
Constructor Details
-
XmlReadContext
-
-
Method Details
-
reset
protected final void reset(int type, int lineNr, int colNr) -
getCurrentValue
- Overrides:
getCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
- Overrides:
setCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
createRootContext
-
createRootContext
-
createChildArrayContext
-
createChildObjectContext
-
getCurrentName
- Specified by:
getCurrentName
in classcom.fasterxml.jackson.core.JsonStreamContext
-
hasCurrentName
public boolean hasCurrentName()- Overrides:
hasCurrentName
in classcom.fasterxml.jackson.core.JsonStreamContext
-
getParent
- Specified by:
getParent
in classcom.fasterxml.jackson.core.JsonStreamContext
-
startLocation
public final com.fasterxml.jackson.core.JsonLocation startLocation(com.fasterxml.jackson.core.io.ContentReference srcRef) - Overrides:
startLocation
in classcom.fasterxml.jackson.core.JsonStreamContext
- Returns:
- Location pointing to the point where the context start marker was found
-
valueStarted
public final void valueStarted()Method called to mark start of new value, mostly to update `index` for Array and Root contexts.- Since:
- 2.12
-
setCurrentName
-
setNamesToWrap
-
shouldWrap
-
convertToArray
protected void convertToArray() -
toString
Overridden to provide developer readable "JsonPath" representation of the context.- Overrides:
toString
in classcom.fasterxml.jackson.core.JsonStreamContext
-