tools.jackson.core.TokenStreamContext
to support features needed by CBOR format (mainly limits of expected
entries to output).
| Modifier and Type | Field and Description |
|---|---|
| protected CBORReadContext | |
| protected String | |
| protected Object | |
| protected final DupDetector | |
| protected int | _expEntryCount
For fixed-size Arrays, Objects, this indicates expected number of entries. |
| protected final CBORReadContext | _parent
Parent context for this context; null for root context. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | |
| public void | assignCurrentValue(Object v)
Overrides tools. Method to call to pass value to be returned via |
| public CBORReadContext | |
| public CBORReadContext | |
| public static CBORReadContext | |
| public String | currentName()
Implements abstract tools. Method for accessing name associated with the current location. |
| public Object | currentValue()
Overrides tools. 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 boolean | expectMoreValues()
Method called to increment the current entry count (Object property, Array element or Root value) for this context level and then see if more entries are accepted. |
| public int | |
| public CBORReadContext | getParent()
Implements abstract tools. Accessor for finding parent context of this context; will return null for root context. |
| public int | |
| public boolean | |
| protected void | |
| public void | |
| public TokenStreamLocation | Returns: Location pointing to the point where the context start marker was foundOverrides tools. 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 String | toString()
Overrides tools. Overridden to provide developer readable "JsonPath" representation of the context. |
| _child | back to summary |
|---|---|
| protected CBORReadContext _child | |
| _currentName | back to summary |
|---|---|
| protected String _currentName | |
| _currentValue | back to summary |
|---|---|
| protected Object _currentValue | |
| _dups | back to summary |
|---|---|
| protected final DupDetector _dups | |
| _expEntryCount | back to summary |
|---|---|
| protected int _expEntryCount For fixed-size Arrays, Objects, this indicates expected number of entries. | |
| _parent | back to summary |
|---|---|
| protected final CBORReadContext _parent Parent context for this context; null for root context. | |
| CBORReadContext | back to summary |
|---|---|
| public CBORReadContext(CBORReadContext parent, DupDetector dups, int type, int expEntryCount) | |
| _checkDup | back to summary |
|---|---|
| private void _checkDup(DupDetector dd, String name) throws StreamReadException | |
| acceptsBreakMarker | back to summary |
|---|---|
| public boolean acceptsBreakMarker() | |
| assignCurrentValue | back to summary |
|---|---|
| public void assignCurrentValue(Object v) Overrides tools. Doc from tools. Method to call to pass value to be returned via
| |
| createChildArrayContext | back to summary |
|---|---|
| public CBORReadContext createChildArrayContext(int expEntryCount) | |
| createChildObjectContext | back to summary |
|---|---|
| public CBORReadContext createChildObjectContext(int expEntryCount) | |
| createRootContext | back to summary |
|---|---|
| public static CBORReadContext createRootContext(DupDetector dups) | |
| currentName | back to summary |
|---|---|
| public String currentName() Implements abstract tools. Doc from tools. Method for accessing name associated with the current location.
Non-null for
| |
| currentValue | back to summary |
|---|---|
| public Object currentValue() Overrides tools. Doc from tools. 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.
| |
| expectMoreValues | back to summary |
|---|---|
| public boolean expectMoreValues() Method called to increment the current entry count (Object property, Array element or Root value) for this context level and then see if more entries are accepted. The only case where more entries are NOT expected is for fixed-count Objects and Arrays that just reached the entry count. Note that since the entry count is updated this is a state-changing method. | |
| getExpectedLength | back to summary |
|---|---|
| public int getExpectedLength() | |
| getParent | back to summary |
|---|---|
| public CBORReadContext getParent() Implements abstract tools. Doc from tools. Accessor for finding parent context of this context; will return null for root context.
| |
| getRemainingExpectedLength | back to summary |
|---|---|
| public int getRemainingExpectedLength() | |
| hasExpectedLength | back to summary |
|---|---|
| public boolean hasExpectedLength() | |
| reset | back to summary |
|---|---|
| protected void reset(int type, int expEntryCount) | |
| setCurrentName | back to summary |
|---|---|
| public void setCurrentName(String name) throws StreamReadException | |
| startLocation | back to summary |
|---|---|
| public TokenStreamLocation startLocation(ContentReference srcRef) Overrides tools. Doc from tools. 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 String toString() Overrides tools. Overridden to provide developer readable "JsonPath" representation of the context.
| |