JsonWriteContext; while not strictly
needed is more streamlined, optimal since there's no need to
keep track of separators etc.
| Modifier and Type | Field and Description |
|---|---|
| protected SmileWriteContext | |
| 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 SmileWriteContext | _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 SmileWriteContext | clearAndGetParent()
Method that can be used to both clear the accumulated references
(specifically value set with |
| public SmileWriteContext | |
| public SmileWriteContext | |
| public static SmileWriteContext | |
| public final String | getCurrentName()
Implements abstract com. |
| public Object | getCurrentValue()
Overrides com. |
| public DupDetector | |
| public final SmileWriteContext | getParent()
Implements abstract com. |
| public boolean | |
| private SmileWriteContext | |
| 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 SmileWriteContext | |
| 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 SmileWriteContext _childToRecycle | |
| _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 SmileWriteContext _parent Parent context for this context; null for root context. | |
| SmileWriteContext | back to summary |
|---|---|
| protected SmileWriteContext(int type, SmileWriteContext parent, DupDetector dups, Object currentValue) | |
| _checkDup | back to summary |
|---|---|
| private final void _checkDup(DupDetector dd, String name) throws JsonProcessingException | |
| clearAndGetParent | back to summary |
|---|---|
| public SmileWriteContext clearAndGetParent() Method that can be used to both clear the accumulated references
(specifically value set with | |
| createChildArrayContext | back to summary |
|---|---|
| public SmileWriteContext createChildArrayContext(Object currentValue) | |
| createChildObjectContext | back to summary |
|---|---|
| public SmileWriteContext createChildObjectContext(Object currentValue) | |
| createRootContext | back to summary |
|---|---|
| public static SmileWriteContext 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 SmileWriteContext 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 SmileWriteContext 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 SmileWriteContext withDupDetector(DupDetector dups) | |
| 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() | |