The TokenStreamContext is used by the pretty printer for handling of the whitespace between tokens, and by the generator for verifying whether it's valid to write a given token. The writeStartSexp method in the IonGenerator will enter a "sexp context", so we need a new state in the write context to track that. Sexp handling is modeled after arrays.
| Modifier and Type | Field and Description |
|---|---|
| protected IonWriteContext | |
| protected String | _currentName
Name of the Object property of which value is to be written; only used for OBJECT contexts |
| protected Object | |
| protected DupDetector | |
| protected boolean | |
| protected final IonWriteContext | _parent
Parent context for this context; null for root context. |
| public static final int | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| protected | IonWriteContext(int type, IonWriteContext 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 IonWriteContext | |
| public IonWriteContext | |
| public IonWriteContext | |
| public static IonWriteContext | |
| 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 final IonWriteContext | getParent()
Implements abstract tools. Accessor for finding parent context of this context; will return null for root context. |
| public boolean | |
| public final boolean | |
| private IonWriteContext | |
| public boolean | |
| public boolean |
| _child | back to summary |
|---|---|
| protected IonWriteContext _child | |
| _currentName | back to summary |
|---|---|
| protected String _currentName Name of the Object 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 | |
| _parent | back to summary |
|---|---|
| protected final IonWriteContext _parent Parent context for this context; null for root context. | |
| STATUS_OK_AFTER_SEXP_SEPARATOR | back to summary |
|---|---|
| public static final int STATUS_OK_AFTER_SEXP_SEPARATOR | |
| TYPE_SEXP | back to summary |
|---|---|
| protected static final int TYPE_SEXP | |
| IonWriteContext | back to summary |
|---|---|
| protected IonWriteContext(int type, IonWriteContext 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
| |
| createChildArrayContext | back to summary |
|---|---|
| public IonWriteContext createChildArrayContext(Object currentValue) | |
| createChildObjectContext | back to summary |
|---|---|
| public IonWriteContext createChildObjectContext(Object currentValue) | |
| createChildSexpContext | back to summary |
|---|---|
| public IonWriteContext createChildSexpContext(Object currentValue) | |
| createRootContext | back to summary |
|---|---|
| public static IonWriteContext 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.
| |
| getParent | back to summary |
|---|---|
| public final IonWriteContext 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.
| |
| inSexp | back to summary |
|---|---|
| public final boolean inSexp() | |
| reset | back to summary |
|---|---|
| private IonWriteContext reset(int type, Object currentValue) | |
| writeName | back to summary |
|---|---|
| public boolean writeName(String name) throws StreamWriteException | |
| writeValue | back to summary |
|---|---|
| public boolean writeValue() | |