All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.util.SimpleTraverserContext Maven / Gradle / Ivy

There is a newer version: 230521-nf-execution
Show newest version
package graphql.util;

import graphql.Internal;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;

@Internal
public class SimpleTraverserContext implements TraverserContext {

    private final Map, Object> vars = new LinkedHashMap<>();
    private final T node;
    private Object result;

    public SimpleTraverserContext(T node) {
        this.node = node;
    }

    @Override
    public T thisNode() {
        return node;
    }


    @Override
    public TraverserContext getParentContext() {
        return null;
    }

    @Override
    public Object getParentResult() {
        return null;
    }

    @Override
    public boolean isVisited() {
        return false;
    }

    @Override
    public Set visitedNodes() {
        return null;
    }

    @Override
    public  S getVar(Class key) {
        return null;
    }

    @Override
    public  TraverserContext setVar(Class key, S value) {
        return null;
    }

    @Override
    public void setResult(Object result) {
        this.result = result;
    }

    @Override
    public Object getResult() {
        return this.result;
    }

    @Override
    public Object getInitialData() {
        return null;
    }
}