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) |
boolean |
expectComma() |
String |
getCurrentName() |
Object |
getCurrentValue() |
Set<String> |
getNamesToWrap() |
XmlReadContext |
getParent() |
com.fasterxml.jackson.core.JsonLocation |
getStartLocation(Object srcRef) |
boolean |
hasCurrentName() |
protected void |
reset(int type,
int lineNr,
int colNr) |
void |
setCurrentName(String name) |
void |
setCurrentValue(Object v) |
void |
setNamesToWrap(Set<String> namesToWrap) |
String |
toString()
Overridden to provide developer readable "JsonPath" representation
of the context.
|
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 boolean expectComma()
public void setCurrentName(String name)
public final com.fasterxml.jackson.core.JsonLocation getStartLocation(Object srcRef)
getStartLocation
in class com.fasterxml.jackson.core.JsonStreamContext
protected void convertToArray()
public final String toString()
toString
in class com.fasterxml.jackson.core.JsonStreamContext
Copyright © 2017 FasterXML. All rights reserved.