TokenStreamContext, used when filtering
content being read or written (based on TokenFilter).
| Modifier and Type | Field and Description |
|---|---|
| protected TokenFilterContext | |
| protected String | _currentName
Name of the property of which value is to be parsed; only used for OBJECT contexts |
| protected Object | |
| protected TokenFilter | _filter
Filter to use for items in this state (for properties of Objects, elements of Arrays, and root-level values of root context) |
| protected boolean | _needToHandleName
Flag that indicates that the current name of this context still needs to be read/written, if path from root down to included leaf is to be exposed. |
| protected final TokenFilterContext | _parent
Parent context for this context; null for root context. |
| protected boolean | _startHandled
Flag that indicates that start token has been read/written, so that matching close token needs to be read/written as well when context is getting closed. |
| Access | Constructor and Description |
|---|---|
| protected | TokenFilterContext(int type, TokenFilterContext parent, TokenFilter filter, Object currValue, boolean startHandled)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected void | |
| public void | assignCurrentValue(Object v)
Overrides tools. Method to call to pass value to be returned via |
| public TokenFilter | Returns: Filter to use for valueCurrently active filter filter)Method called to check whether value is to be included at current output position, either as Object property, Array element, or root value. |
| public TokenFilterContext | |
| public TokenFilterContext | |
| public TokenFilterContext | |
| public TokenFilterContext | |
| public static TokenFilterContext | |
| 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 void | ensurePropertyNameWritten(JsonGenerator
Generator to use to write the property name, if necessary gen)Method called to ensure that the property name, if present, has been written; may result (but does not always) in a call using given generator |
| public TokenFilterContext | |
| public TokenFilter | |
| public final TokenFilterContext | getParent()
Implements abstract tools. Accessor for finding parent context of this context; will return null for root context. |
| public boolean | |
| public boolean | |
| public JsonToken | |
| protected TokenFilterContext | |
| public TokenFilter | |
| public void | |
| public String | toString()
Overrides tools. Overridden to provide developer readable "JsonPath" representation of the context. |
| public void | writePath(JsonGenerator
Generator to use to write the path, if necessary gen)Method called to ensure that parent path from root is written up to and including this node. |
| _child | back to summary |
|---|---|
| protected TokenFilterContext _child | |
| _currentName | back to summary |
|---|---|
| protected String _currentName Name of the property of which value is to be parsed; only used for OBJECT contexts | |
| _currentValue | back to summary |
|---|---|
protected Object _currentValue
| |
| _filter | back to summary |
|---|---|
| protected TokenFilter _filter Filter to use for items in this state (for properties of Objects, elements of Arrays, and root-level values of root context) | |
| _needToHandleName | back to summary |
|---|---|
| protected boolean _needToHandleName Flag that indicates that the current name of this context still needs to be read/written, if path from root down to included leaf is to be exposed. | |
| _parent | back to summary |
|---|---|
| protected final TokenFilterContext _parent Parent context for this context; null for root context. | |
| _startHandled | back to summary |
|---|---|
| protected boolean _startHandled Flag that indicates that start token has been read/written, so that matching close token needs to be read/written as well when context is getting closed. | |
| TokenFilterContext | back to summary |
|---|---|
| protected TokenFilterContext(int type, TokenFilterContext parent, TokenFilter filter, Object currValue, boolean startHandled) | |
| _writePath | back to summary |
|---|---|
| private void _writePath(JsonGenerator gen) throws JacksonException | |
| appendDesc | back to summary |
|---|---|
| protected void appendDesc(StringBuilder sb) | |
| assignCurrentValue | back to summary |
|---|---|
| public void assignCurrentValue(Object v) Overrides tools. Doc from tools. Method to call to pass value to be returned via
| |
| checkValue | back to summary |
|---|---|
| public TokenFilter checkValue(TokenFilter filter) Method called to check whether value is to be included at current output position, either as Object property, Array element, or root value.
| |
| closeArray | back to summary |
|---|---|
| public TokenFilterContext closeArray(JsonGenerator gen) throws JacksonException | |
| closeObject | back to summary |
|---|---|
| public TokenFilterContext closeObject(JsonGenerator gen) throws JacksonException | |
| createChildArrayContext | back to summary |
|---|---|
| public TokenFilterContext createChildArrayContext(TokenFilter filter, Object currentValue, boolean writeStart) | |
| createChildObjectContext | back to summary |
|---|---|
| public TokenFilterContext createChildObjectContext(TokenFilter filter, Object currentValue, boolean writeStart) | |
| createRootContext | back to summary |
|---|---|
| public static TokenFilterContext createRootContext(TokenFilter filter) | |
| 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.
| |
| ensurePropertyNameWritten | back to summary |
|---|---|
| public void ensurePropertyNameWritten(JsonGenerator gen) throws JacksonException Method called to ensure that the property name, if present, has been written; may result (but does not always) in a call using given generator
| |
| findChildOf | back to summary |
|---|---|
| public TokenFilterContext findChildOf(TokenFilterContext parent) | |
| getFilter | back to summary |
|---|---|
| public TokenFilter getFilter() | |
| getParent | back to summary |
|---|---|
| public final TokenFilterContext 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.
| |
| isStartHandled | back to summary |
|---|---|
| public boolean isStartHandled() | |
| nextTokenToRead | back to summary |
|---|---|
| public JsonToken nextTokenToRead() | |
| reset | back to summary |
|---|---|
| protected TokenFilterContext reset(int type, TokenFilter filter, Object currValue, boolean startWritten) | |
| setPropertyName | back to summary |
|---|---|
| public TokenFilter setPropertyName(String name) | |
| skipParentChecks | back to summary |
|---|---|
| public void skipParentChecks() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides tools. Doc from tools. Overridden to provide developer readable "JsonPath" representation of the context.
| |
| writePath | back to summary |
|---|---|
| public void writePath(JsonGenerator gen) throws JacksonException Method called to ensure that parent path from root is written up to and including this node.
| |