JsonWriteContext, needed to support alternative
numeric field id for Integer-valued Maps that CBOR allows.
| Modifier and Type | Field and Description |
|---|---|
| protected CBORWriteContext | |
| protected long | _currentFieldId
Alternative to |
| protected String | _currentName
Name of the field of which value is to be written; only used for OBJECT contexts |
| protected Object | |
| protected DupDetector | |
| protected boolean | _gotFieldId
Marker used to indicate that we just wrote a field name (or Map name / id) and now expect a value to write |
| protected final CBORWriteContext | _parent
Parent context for this context; null for root context. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private final void | |
| public CBORWriteContext | clearAndGetParent()
Method that can be used to both clear the accumulated references
(specifically value set with |
| public CBORWriteContext | |
| public CBORWriteContext | |
| public static CBORWriteContext | |
| public final String | getCurrentName()
Implements abstract com. |
| public Object | getCurrentValue()
Overrides com. |
| public DupDetector | |
| public final CBORWriteContext | getParent()
Implements abstract com. |
| public boolean | |
| private CBORWriteContext | |
| public void | setCurrentValue(Object
Current value to assign to this context v)Overrides com. getCurrentValue; typically
called indirectly through JsonParser#setCurrentValue
or JsonGenerator#setCurrentValue).
|
| public CBORWriteContext | |
| public boolean | |
| public boolean | Returns: Ok if name writing should proceedMethod that writer is to call before it writes a field name. |
| public boolean |
| _childToRecycle | back to summary |
|---|---|
| protected CBORWriteContext _childToRecycle | |
| _currentFieldId | back to summary |
|---|---|
| protected long _currentFieldId Alternative to | |
| _currentName | back to summary |
|---|---|
| protected String _currentName Name of the field of which value is to be written; only used for OBJECT contexts | |
| _currentValue | back to summary |
|---|---|
| protected Object _currentValue | |
| _dups | back to summary |
|---|---|
| protected DupDetector _dups | |
| _gotFieldId | back to summary |
|---|---|
| protected boolean _gotFieldId Marker used to indicate that we just wrote a field name (or Map name / id) and now expect a value to write | |
| _parent | back to summary |
|---|---|
| protected final CBORWriteContext _parent Parent context for this context; null for root context. | |
| CBORWriteContext | back to summary |
|---|---|
| protected CBORWriteContext(int type, CBORWriteContext parent, DupDetector dups, Object currentValue) | |
| _checkDup | back to summary |
|---|---|
| private final void _checkDup(DupDetector dd, String name) throws JsonProcessingException | |
| clearAndGetParent | back to summary |
|---|---|
| public CBORWriteContext clearAndGetParent() Method that can be used to both clear the accumulated references
(specifically value set with | |
| createChildArrayContext | back to summary |
|---|---|
| public CBORWriteContext createChildArrayContext(Object currentValue) | |
| createChildObjectContext | back to summary |
|---|---|
| public CBORWriteContext createChildObjectContext(Object currentValue) | |
| createRootContext | back to summary |
|---|---|
| public static CBORWriteContext createRootContext(DupDetector dd) | |
| 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. | |
| getDupDetector | back to summary |
|---|---|
| public DupDetector getDupDetector() | |
| getParent | back to summary |
|---|---|
| public final CBORWriteContext 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 |
|---|---|
| private CBORWriteContext reset(int type, Object currentValue) | |
| setCurrentValue | back to summary |
|---|---|
| public void setCurrentValue(Object v) Overrides com. Doc from com. Method to call to pass value to be returned via | |
| withDupDetector | back to summary |
|---|---|
| public CBORWriteContext withDupDetector(DupDetector dups) | |
| writeFieldId | back to summary |
|---|---|
| public boolean writeFieldId(long fieldId) throws JsonProcessingException | |
| writeFieldName | back to summary |
|---|---|
| public boolean writeFieldName(String name) throws JsonProcessingException Method that writer is to call before it writes a field name.
| |
| writeValue | back to summary |
|---|---|
| public boolean writeValue() | |