T - type of tree node@PublicApi public interface TraverserContext<T>
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getInitialData()
Used to share something across all TraverserContext.
|
TraverserContext<T> |
getParentContext()
Returns parent context.
|
java.lang.Object |
getParentResult()
The result of the
getParentContext(). |
java.lang.Object |
getResult()
The result of this TraverserContext..
|
<S> S |
getVar(java.lang.Class<? super S> key)
Obtains a context local variable
|
boolean |
isVisited()
Informs that the current node has been already "visited"
|
void |
setResult(java.lang.Object result)
Set the result for this TraverserContext.
|
<S> TraverserContext<T> |
setVar(java.lang.Class<? super S> key,
S value)
Stores a variable in the context
|
T |
thisNode()
Returns current node being visited
|
java.util.Set<T> |
visitedNodes()
Obtains all visited nodes and values received by the
TraverserVisitor.enter(graphql.util.TraverserContext)
method |
T thisNode()
TraverserContext<T> getParentContext()
getParentContext() links one could obtain
the current path as well as the variables getVar(java.lang.Class)
stored in every parent context.java.lang.Object getParentResult()
getParentContext().boolean isVisited()
true if a node had been already visitedjava.util.Set<T> visitedNodes()
TraverserVisitor.enter(graphql.util.TraverserContext)
method<S> S getVar(java.lang.Class<? super S> key)
S - type of the variablekey - key to lookup the variable valuenull<S> TraverserContext<T> setVar(java.lang.Class<? super S> key, S value)
S - type of a varablekey - key to create bindings for the variablevalue - value of variablevoid setResult(java.lang.Object result)
result - java.lang.Object getResult()
java.lang.Object getInitialData()