java.lang.Object
tools.jackson.core.TokenStreamContext
tools.jackson.dataformat.xml.deser.XmlReadContext
public final class XmlReadContext
extends tools.jackson.core.TokenStreamContext
Extension of
TokenStreamContext, 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 XmlReadContextprotected intprotected Stringprotected Objectprotected final tools.jackson.core.json.DupDetectorObject used for checking for duplicate field names, if enabled (null if not enabled)protected intprotected final XmlReadContextprotected StringName of property that requires wrappingFields inherited from class tools.jackson.core.TokenStreamContext
_index, _nestingDepth, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT -
Constructor Summary
ConstructorsConstructorDescriptionXmlReadContext(int type, XmlReadContext parent, int nestingDepth, int lineNr, int colNr) Deprecated.XmlReadContext(int type, XmlReadContext parent, tools.jackson.core.json.DupDetector dups, int nestingDepth, int lineNr, int colNr) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidfinal XmlReadContextcreateChildArrayContext(int lineNr, int colNr) final XmlReadContextcreateChildObjectContext(int lineNr, int colNr) static XmlReadContextcreateRootContext(int lineNr, int colNr) Deprecated.static XmlReadContextcreateRootContext(tools.jackson.core.json.DupDetector dups, int lineNr, int colNr) final Stringfinal XmlReadContextbooleanprotected final voidreset(int type, int lineNr, int colNr) voidsetCurrentName(String name) voidsetNamesToWrap(Set<String> namesToWrap) booleanshouldWrap(String localName) final tools.jackson.core.TokenStreamLocationstartLocation(tools.jackson.core.io.ContentReference srcRef) final StringtoString()Overridden to provide developer readable "JsonPath" representation of the context.final voidMethod called to mark start of new value, mostly to update `index` for Array and Root contexts.Methods inherited from class tools.jackson.core.TokenStreamContext
getCurrentIndex, getEntryCount, getNestingDepth, hasCurrentIndex, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, typeDesc
-
Field Details
-
_parent
-
_dups
protected final tools.jackson.core.json.DupDetector _dupsObject used for checking for duplicate field names, if enabled (null if not enabled) -
_lineNr
protected int _lineNr -
_columnNr
protected int _columnNr -
_currentName
-
_currentValue
-
_namesToWrap
-
_wrappedName
Name of property that requires wrapping -
_child
-
-
Constructor Details
-
XmlReadContext
public XmlReadContext(int type, XmlReadContext parent, tools.jackson.core.json.DupDetector dups, int nestingDepth, int lineNr, int colNr) -
XmlReadContext
@Deprecated public XmlReadContext(int type, XmlReadContext parent, int nestingDepth, int lineNr, int colNr) Deprecated.
-
-
Method Details
-
reset
protected final void reset(int type, int lineNr, int colNr) -
currentValue
- Overrides:
currentValuein classtools.jackson.core.TokenStreamContext
-
assignCurrentValue
- Overrides:
assignCurrentValuein classtools.jackson.core.TokenStreamContext
-
createRootContext
public static XmlReadContext createRootContext(tools.jackson.core.json.DupDetector dups, int lineNr, int colNr) -
createRootContext
Deprecated. -
createChildArrayContext
-
createChildObjectContext
-
currentName
- Specified by:
currentNamein classtools.jackson.core.TokenStreamContext
-
hasCurrentName
public boolean hasCurrentName()- Overrides:
hasCurrentNamein classtools.jackson.core.TokenStreamContext
-
getParent
- Specified by:
getParentin classtools.jackson.core.TokenStreamContext
-
startLocation
public final tools.jackson.core.TokenStreamLocation startLocation(tools.jackson.core.io.ContentReference srcRef) - Overrides:
startLocationin classtools.jackson.core.TokenStreamContext- 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. -
setCurrentName
- Throws:
tools.jackson.core.exc.StreamReadException
-
setNamesToWrap
-
shouldWrap
-
convertToArray
protected void convertToArray() -
toString
Overridden to provide developer readable "JsonPath" representation of the context.- Overrides:
toStringin classtools.jackson.core.TokenStreamContext
-