Class AbstractNode<T extends Node>

java.lang.Object
graphql.language.AbstractNode<T>
All Implemented Interfaces:
Node<T>, Serializable
Direct Known Subclasses:
AbstractDescribedNode, Argument, ArrayValue, BooleanValue, Directive, DirectiveLocation, Document, EnumValue, Field, FloatValue, FragmentDefinition, FragmentSpread, InlineFragment, IntValue, ListType, NonNullType, NullValue, ObjectField, ObjectValue, OperationDefinition, OperationTypeDefinition, SelectionSet, StringValue, TypeName, VariableDefinition, VariableReference

@PublicApi public abstract class AbstractNode<T extends Node> extends Object implements Node<T>
See Also:
  • Constructor Details

  • Method Details

    • getSourceLocation

      public SourceLocation getSourceLocation()
      Specified by:
      getSourceLocation in interface Node<T extends Node>
      Returns:
      the source location where this node occurs
    • getComments

      public List<Comment> getComments()
      Description copied from interface: Node
      Nodes can have comments made on them, the following is one comment per line before a node.
      Specified by:
      getComments in interface Node<T extends Node>
      Returns:
      the list of comments or an empty list of there are none
    • getIgnoredChars

      public IgnoredChars getIgnoredChars()
      Description copied from interface: Node
      The chars which are ignored by the parser. (Before and after the current node)
      Specified by:
      getIgnoredChars in interface Node<T extends Node>
      Returns:
      the ignored chars
    • getAdditionalData

      public Map<String,String> getAdditionalData()
      Description copied from interface: Node
      A node can have a map of additional data associated with it.

      NOTE: The reason this is a map of strings is so the Node can stay an immutable object, which Map<String,Object> would not allow say.

      Specified by:
      getAdditionalData in interface Node<T extends Node>
      Returns:
      the map of additional data about this node
    • deepCopy

      protected <V extends Node> V deepCopy(V nullableObj)
    • deepCopy

      protected <V extends Node> List<V> deepCopy(List<? extends Node> list)