TokenFilter implementation that takes a single
JsonPointer and matches a single value accordingly.
Instances are immutable and fully thread-safe, shareable,
and efficient to use.
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | _includeAllElements
If true include all array elements by ignoring the array index match and advancing the JsonPointer to the next level |
| protected final JsonPointer |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | JsonPointerBasedFilter(JsonPointer
Content to extract pathToMatch, boolean if true array indexes in includeAllElements)ptrExpr are ignored
and all elements will be matched. default: false
|
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | _includeScalar()
Overrides tools. Overridable default implementation delegated to all scalar value inclusion check methods. |
| protected JsonPointerBasedFilter | Returns: Filter constructedRemaining path for filter to match pathToMatch, boolean Whether to just include all array elements
of matching Array-valued path automatically includeAllElements)Overridable factory method use for creating new instances by
default |
| public TokenFilter | filterStartArray()
Overrides tools. Method called to check whether Array value at current output location should be included in output. |
| public TokenFilter | filterStartObject()
Overrides tools. Method called to check whether Object value at current output location should be included in output. |
| public TokenFilter | includeElement(int index)
Overrides tools. Method called to check whether array element with specified index (zero-based), at current output location, should be included in output. |
| public TokenFilter | includeProperty(String name)
Overrides tools. Method called to check whether property value with specified name, at current output location, should be included in output. |
| public String | toString()
Overrides tools. Returns a string representation of the object. |
| _includeAllElements | back to summary |
|---|---|
| protected final boolean _includeAllElements If true include all array elements by ignoring the array index match and advancing the JsonPointer to the next level
| |
| _pathToMatch | back to summary |
|---|---|
| protected final JsonPointer _pathToMatch | |
| JsonPointerBasedFilter | back to summary |
|---|---|
| public JsonPointerBasedFilter(String ptrExpr) | |
| JsonPointerBasedFilter | back to summary |
|---|---|
public JsonPointerBasedFilter(JsonPointer pathToMatch)
| |
| JsonPointerBasedFilter | back to summary |
|---|---|
public JsonPointerBasedFilter(JsonPointer pathToMatch, boolean includeAllElements)
| |
| _includeScalar | back to summary |
|---|---|
| protected boolean _includeScalar() Overrides tools. Doc from tools. Overridable default implementation delegated to all scalar value inclusion check methods. The default implementation simply includes all leaf values.
| |
| construct | back to summary |
|---|---|
| protected JsonPointerBasedFilter construct(JsonPointer pathToMatch, boolean includeAllElements) Overridable factory method use for creating new instances by
default
| |
| filterStartArray | back to summary |
|---|---|
| public TokenFilter filterStartArray() Overrides tools. Doc from tools. Method called to check whether Array value at current output location should be included in output. Three kinds of return values may be used as follows:
Default implementation returns
| |
| filterStartObject | back to summary |
|---|---|
| public TokenFilter filterStartObject() Overrides tools. Doc from tools. Method called to check whether Object value at current output location should be included in output. Three kinds of return values may be used as follows:
Default implementation returns
| |
| includeElement | back to summary |
|---|---|
| public TokenFilter includeElement(int index) Overrides tools. Doc from tools. Method called to check whether array element with specified index (zero-based), at current output location, should be included in output. Three kinds of return values may be used as follows:
The default implementation simply returns
| |
| includeProperty | back to summary |
|---|---|
| public TokenFilter includeProperty(String name) Overrides tools. Doc from tools. Method called to check whether property value with specified name, at current output location, should be included in output. Three kinds of return values may be used as follows:
The default implementation simply returns
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides tools. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |