T
- the type of tree to traverse@ThreadSafe
public abstract class TokenResolver<T extends com.fasterxml.jackson.core.TreeNode>
extends java.lang.Object
This class is meant to be extended and implemented for all types of trees
inheriting TreeNode
.
This package contains one implementation of this class for JsonNode
.
Note that its equals(Object)
, hashCode()
and toString()
are final.
JsonNodeResolver
Modifier and Type | Field and Description |
---|---|
protected ReferenceToken |
token
The associated reference token
|
Modifier | Constructor and Description |
---|---|
protected |
TokenResolver(ReferenceToken token)
The only constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
abstract T |
get(T node)
Advance one level into the tree
|
ReferenceToken |
getToken() |
int |
hashCode() |
java.lang.String |
toString() |
protected final ReferenceToken token
protected TokenResolver(ReferenceToken token)
token
- the reference tokenpublic abstract T get(T node)
Note: it is required that this method return null on traversal failure.
Note 2: handling null
itself is up to implementations.
node
- the node to traversenull
if no such node exists for that
tokenpublic final ReferenceToken getToken()
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object