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 | |
| protected int | |
| protected String | |
| protected Object | |
| protected int | |
| protected Set | |
| protected final XmlReadContext | |
| protected String | _wrappedName
Name of property that requires wrapping |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public final XmlReadContext | |
| public final XmlReadContext | |
| public static XmlReadContext | |
| public static XmlReadContext | |
| public final String | getCurrentName()
Implements abstract com. Method for accessing name associated with the current location. |
| public Object | getCurrentValue()
Overrides com. Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy. |
| public final XmlReadContext | getParent()
Implements abstract com. Accessor for finding parent context of this context; will return null for root context. |
| public boolean | |
| protected final void | |
| public void | |
| public void | setCurrentValue(Object
Current value to assign to this context v)Overrides com. Method to call to pass value to be returned via |
| public void | |
| public boolean | |
| public final JsonLocation | Returns: Location pointing to the point where the context start marker was foundSource reference needed to construct location instance srcRef)Overrides com. Optional method that may be used to access starting location of this context: for example, in case of JSON `Object` context, offset at which `[` token was read or written. |
| public final String | toString()
Overrides com. Overridden to provide developer readable "JsonPath" representation of the context. |
| public final void | valueStarted()
Method called to mark start of new value, mostly to update `index` for Array and Root contexts. |
| _child | back to summary |
|---|---|
| protected XmlReadContext _child | |
| _columnNr | back to summary |
|---|---|
| protected int _columnNr | |
| _currentName | back to summary |
|---|---|
| protected String _currentName | |
| _currentValue | back to summary |
|---|---|
protected Object _currentValue
| |
| _lineNr | back to summary |
|---|---|
| protected int _lineNr | |
| _namesToWrap | back to summary |
|---|---|
| protected Set<String> _namesToWrap | |
| _parent | back to summary |
|---|---|
| protected final XmlReadContext _parent | |
| _wrappedName | back to summary |
|---|---|
| protected String _wrappedName Name of property that requires wrapping | |
| XmlReadContext | back to summary |
|---|---|
public XmlReadContext(XmlReadContext parent, int nestingDepth, int type, int lineNr, int colNr)
| |
| XmlReadContext | back to summary |
|---|---|
| public XmlReadContext(XmlReadContext parent, int type, int lineNr, int colNr)
Deprecated Since 2.18
| |
| convertToArray | back to summary |
|---|---|
| protected void convertToArray() | |
| createChildArrayContext | back to summary |
|---|---|
| public final XmlReadContext createChildArrayContext(int lineNr, int colNr) | |
| createChildObjectContext | back to summary |
|---|---|
| public final XmlReadContext createChildObjectContext(int lineNr, int colNr) | |
| createRootContext | back to summary |
|---|---|
| public static XmlReadContext createRootContext(int lineNr, int colNr) | |
| createRootContext | back to summary |
|---|---|
| public static XmlReadContext createRootContext() | |
| getCurrentName | back to summary |
|---|---|
| public final String getCurrentName() Implements abstract com. Doc from com. Method for accessing name associated with the current location.
Non-null for | |
| getCurrentValue | back to summary |
|---|---|
| public Object getCurrentValue() Overrides com. Doc from com. Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy. Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding. | |
| getParent | back to summary |
|---|---|
| public final XmlReadContext getParent() Implements abstract com. Doc from com. Accessor for finding parent context of this context; will return null for root context.
| |
| hasCurrentName | back to summary |
|---|---|
| public boolean hasCurrentName() Overrides com.
| |
| reset | back to summary |
|---|---|
| protected final void reset(int type, int lineNr, int colNr) | |
| setCurrentName | back to summary |
|---|---|
| public void setCurrentName(String name) | |
| setCurrentValue | back to summary |
|---|---|
| public void setCurrentValue(Object v) Overrides com. Doc from com. Method to call to pass value to be returned via | |
| setNamesToWrap | back to summary |
|---|---|
| public void setNamesToWrap(Set<String> namesToWrap) | |
| shouldWrap | back to summary |
|---|---|
| public boolean shouldWrap(String localName) | |
| startLocation | back to summary |
|---|---|
| public final JsonLocation startLocation(ContentReference srcRef) Overrides com. Doc from com. Optional method that may be used to access starting location of this context:
for example, in case of JSON `Object` context, offset at which `[` token was
read or written. Often used for error reporting purposes.
Implementations that do not keep track of such location are expected to return
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides com. Overridden to provide developer readable "JsonPath" representation of the context.
| |
| valueStarted | back to summary |
|---|---|
| public final void valueStarted() Method called to mark start of new value, mostly to update `index` for Array and Root contexts.
| |