public final class XmlReadContext
extends com.fasterxml.jackson.core.JsonStreamContext
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.
Modifier and Type | Field and Description |
---|---|
protected XmlReadContext |
_child |
protected int |
_columnNr |
protected String |
_currentName |
protected Object |
_currentValue |
protected int |
_lineNr |
protected Set<String> |
_namesToWrap |
protected XmlReadContext |
_parent |
protected String |
_wrappedName
Name of property that requires wrapping
|
Constructor and Description |
---|
XmlReadContext(XmlReadContext parent,
int type,
int lineNr,
int colNr) |
Modifier and Type | Method and Description |
---|---|
protected void |
convertToArray() |
XmlReadContext |
createChildArrayContext(int lineNr,
int colNr) |
XmlReadContext |
createChildObjectContext(int lineNr,
int colNr) |
static XmlReadContext |
createRootContext() |
static XmlReadContext |
createRootContext(int lineNr,
int colNr) |
String |
getCurrentName() |
Object |
getCurrentValue() |
XmlReadContext |
getParent() |
boolean |
hasCurrentName() |
protected void |
reset(int type,
int lineNr,
int colNr) |
void |
setCurrentName(String name) |
void |
setCurrentValue(Object v) |
void |
setNamesToWrap(Set<String> namesToWrap) |
boolean |
shouldWrap(String localName) |
com.fasterxml.jackson.core.JsonLocation |
startLocation(com.fasterxml.jackson.core.io.ContentReference srcRef) |
String |
toString()
Overridden to provide developer readable "JsonPath" representation
of the context.
|
void |
valueStarted()
Method called to mark start of new value, mostly to update `index`
for Array and Root contexts.
|
protected final XmlReadContext _parent
protected int _lineNr
protected int _columnNr
protected String _currentName
protected Object _currentValue
protected String _wrappedName
protected XmlReadContext _child
public XmlReadContext(XmlReadContext parent, int type, int lineNr, int colNr)
protected final void reset(int type, int lineNr, int colNr)
public Object getCurrentValue()
getCurrentValue
in class com.fasterxml.jackson.core.JsonStreamContext
public void setCurrentValue(Object v)
setCurrentValue
in class com.fasterxml.jackson.core.JsonStreamContext
public static XmlReadContext createRootContext(int lineNr, int colNr)
public static XmlReadContext createRootContext()
public final XmlReadContext createChildArrayContext(int lineNr, int colNr)
public final XmlReadContext createChildObjectContext(int lineNr, int colNr)
public final String getCurrentName()
getCurrentName
in class com.fasterxml.jackson.core.JsonStreamContext
public boolean hasCurrentName()
hasCurrentName
in class com.fasterxml.jackson.core.JsonStreamContext
public final XmlReadContext getParent()
getParent
in class com.fasterxml.jackson.core.JsonStreamContext
public final com.fasterxml.jackson.core.JsonLocation startLocation(com.fasterxml.jackson.core.io.ContentReference srcRef)
startLocation
in class com.fasterxml.jackson.core.JsonStreamContext
public final void valueStarted()
public void setCurrentName(String name)
public boolean shouldWrap(String localName)
protected void convertToArray()
public final String toString()
toString
in class com.fasterxml.jackson.core.JsonStreamContext
Copyright © 2022 FasterXML. All rights reserved.