TokenStreamContext useful for most
format backend JsonGenerator implementations
(with notable exception of JSON that needs bit more advanced state).
| Modifier and Type | Field and Description |
|---|---|
| protected SimpleStreamWriteContext | |
| protected String | _currentName
Name of the property of which value is to be written; only used for OBJECT contexts. |
| protected Object | |
| protected DupDetector | |
| protected boolean | _gotPropertyId
Marker used to indicate that we just wrote a property name (or possibly property id for some backends) and now expect a value to write. |
| protected final SimpleStreamWriteContext | _parent
Parent context for this context; null for root context. |
| Access | Constructor and Description |
|---|---|
| protected | SimpleStreamWriteContext(int type, SimpleStreamWriteContext parent, int nestingDepth, DupDetector dups, Object currentValue)
|
| Modifier and Type | Method and Description |
|---|---|
| private final void | |
| public void | assignCurrentValue(Object v)
Overrides tools. Method to call to pass value to be returned via |
| public SimpleStreamWriteContext | Returns: Parent context of this context node, if any;null for root contextMethod that can be used to both clear the accumulated references
(specifically value set with |
| public SimpleStreamWriteContext | |
| public SimpleStreamWriteContext | |
| public static SimpleStreamWriteContext | |
| public final 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 DupDetector | |
| public final SimpleStreamWriteContext | getParent()
Implements abstract tools. Accessor for finding parent context of this context; will return null for root context. |
| public boolean | |
| private SimpleStreamWriteContext | |
| public SimpleStreamWriteContext | |
| public boolean | |
| public boolean |
| _childToRecycle | back to summary |
|---|---|
| protected SimpleStreamWriteContext _childToRecycle | |
| _currentName | back to summary |
|---|---|
| protected String _currentName Name of the property 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 | |
| _gotPropertyId | back to summary |
|---|---|
| protected boolean _gotPropertyId Marker used to indicate that we just wrote a property name (or possibly property id for some backends) and now expect a value to write. | |
| _parent | back to summary |
|---|---|
| protected final SimpleStreamWriteContext _parent Parent context for this context; null for root context. | |
| SimpleStreamWriteContext | back to summary |
|---|---|
| protected SimpleStreamWriteContext(int type, SimpleStreamWriteContext parent, int nestingDepth, DupDetector dups, Object currentValue) | |
| _checkDup | back to summary |
|---|---|
| private final void _checkDup(DupDetector dd, String name) throws StreamWriteException | |
| assignCurrentValue | back to summary |
|---|---|
| public void assignCurrentValue(Object v) Overrides tools. Doc from tools. Method to call to pass value to be returned via
| |
| clearAndGetParent | back to summary |
|---|---|
| public SimpleStreamWriteContext clearAndGetParent() Method that can be used to both clear the accumulated references
(specifically value set with
| |
| createChildArrayContext | back to summary |
|---|---|
| public SimpleStreamWriteContext createChildArrayContext(Object currentValue) | |
| createChildObjectContext | back to summary |
|---|---|
| public SimpleStreamWriteContext createChildObjectContext(Object currentValue) | |
| createRootContext | back to summary |
|---|---|
| public static SimpleStreamWriteContext createRootContext(DupDetector dd) | |
| currentName | back to summary |
|---|---|
| public final 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.
| |
| getDupDetector | back to summary |
|---|---|
| public DupDetector getDupDetector() | |
| getParent | back to summary |
|---|---|
| public final SimpleStreamWriteContext getParent() Implements abstract tools. Doc from tools. Accessor for finding parent context of this context; will return null for root context.
| |
| hasCurrentName | back to summary |
|---|---|
| public boolean hasCurrentName() Overrides tools.
| |
| reset | back to summary |
|---|---|
| private SimpleStreamWriteContext reset(int type, Object currentValue) | |
| withDupDetector | back to summary |
|---|---|
| public SimpleStreamWriteContext withDupDetector(DupDetector dups) | |
| writeName | back to summary |
|---|---|
| public boolean writeName(String name) throws StreamWriteException Method that writer is to call before it writes an Object Property name.
| |
| writeValue | back to summary |
|---|---|
| public boolean writeValue() | |