Package graphql.language
Class AbstractNode<T extends Node>
- java.lang.Object
-
- graphql.language.AbstractNode<T>
-
- All Implemented Interfaces:
Node<T>,java.io.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 java.lang.Object implements Node<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractNode(SourceLocation sourceLocation, java.util.List<Comment> comments, IgnoredChars ignoredChars)AbstractNode(SourceLocation sourceLocation, java.util.List<Comment> comments, IgnoredChars ignoredChars, java.util.Map<java.lang.String,java.lang.String> additionalData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <V extends Node>
java.util.List<V>deepCopy(java.util.List<? extends Node> list)protected <V extends Node>
VdeepCopy(V nullableObj)java.util.Map<java.lang.String,java.lang.String>getAdditionalData()A node can have a map of additional data associated with it.java.util.List<Comment>getComments()Nodes can have comments made on them, the following is one comment per line before a node.IgnoredCharsgetIgnoredChars()The chars which are ignored by the parser.SourceLocationgetSourceLocation()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface graphql.language.Node
accept, deepCopy, getChildren, getNamedChildren, isEqualTo, withNewChildren
-
-
-
-
Constructor Detail
-
AbstractNode
public AbstractNode(SourceLocation sourceLocation, java.util.List<Comment> comments, IgnoredChars ignoredChars)
-
AbstractNode
public AbstractNode(SourceLocation sourceLocation, java.util.List<Comment> comments, IgnoredChars ignoredChars, java.util.Map<java.lang.String,java.lang.String> additionalData)
-
-
Method Detail
-
getSourceLocation
public SourceLocation getSourceLocation()
- Specified by:
getSourceLocationin interfaceNode<T extends Node>- Returns:
- the source location where this node occurs
-
getComments
public java.util.List<Comment> getComments()
Description copied from interface:NodeNodes can have comments made on them, the following is one comment per line before a node.- Specified by:
getCommentsin interfaceNode<T extends Node>- Returns:
- the list of comments or an empty list of there are none
-
getIgnoredChars
public IgnoredChars getIgnoredChars()
Description copied from interface:NodeThe chars which are ignored by the parser. (Before and after the current node)- Specified by:
getIgnoredCharsin interfaceNode<T extends Node>- Returns:
- the ignored chars
-
getAdditionalData
public java.util.Map<java.lang.String,java.lang.String> getAdditionalData()
Description copied from interface:NodeA 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:
getAdditionalDatain interfaceNode<T extends Node>- Returns:
- the map of additional data about this node
-
deepCopy
protected <V extends Node> V deepCopy(V nullableObj)
-
-