Class NodeParentTree<T extends Node>


  • @PublicApi
    public class NodeParentTree<T extends Node>
    extends java.lang.Object
    This represents a hierarchy from a graphql language node upwards to its associated parent nodes. For example a Directive can be on a InputValueDefinition which can be on a Argument, which can be on a FieldDefinition which may be on an ObjectTypeDefinition.
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeParentTree​(java.util.Deque<T> nodeStack)  
    • Constructor Detail

      • NodeParentTree

        public NodeParentTree​(java.util.Deque<T> nodeStack)
    • Method Detail

      • getNode

        public T getNode()
        Returns the node represented by this info
        Returns:
        the node in play
      • getParentInfo

        public java.util.Optional<NodeParentTree<T>> getParentInfo()
        Returns:
        a node MAY have an optional parent
      • getPath

        public java.util.List<java.lang.String> getPath()
        Returns:
        a path of names for nodes thar are NamedNodes
      • toList

        public java.util.List<T> toList()
        Returns:
        the tree as a list of T
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object