Package graphql.language
Class NodeUtil
- java.lang.Object
-
- graphql.language.NodeUtil
-
public class NodeUtil extends java.lang.Object
Helper class for working withNode
s
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeUtil.GetOperationResult
-
Constructor Summary
Constructors Constructor Description NodeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,com.google.common.collect.ImmutableList<Directive>>
allDirectivesByName(java.util.List<Directive> directives)
static void
assertNewChildrenAreEmpty(NodeChildrenContainer newChildren)
static <T extends NamedNode<T>>
TfindNodeByName(java.util.List<T> namedNodes, java.lang.String name)
static java.util.Map<java.lang.String,FragmentDefinition>
getFragmentsByName(Document document)
static NodeUtil.GetOperationResult
getOperation(Document document, java.lang.String operationName)
static <T extends NamedNode<T>>
java.util.Map<java.lang.String,T>nodeByName(java.util.List<T> nameNode)
static Node
removeChild(Node node, NodeLocation childLocationToRemove)
-
-
-
Method Detail
-
findNodeByName
public static <T extends NamedNode<T>> T findNodeByName(java.util.List<T> namedNodes, java.lang.String name)
-
allDirectivesByName
public static java.util.Map<java.lang.String,com.google.common.collect.ImmutableList<Directive>> allDirectivesByName(java.util.List<Directive> directives)
-
nodeByName
public static <T extends NamedNode<T>> java.util.Map<java.lang.String,T> nodeByName(java.util.List<T> nameNode)
-
getFragmentsByName
public static java.util.Map<java.lang.String,FragmentDefinition> getFragmentsByName(Document document)
-
getOperation
public static NodeUtil.GetOperationResult getOperation(Document document, java.lang.String operationName)
-
assertNewChildrenAreEmpty
public static void assertNewChildrenAreEmpty(NodeChildrenContainer newChildren)
-
removeChild
public static Node removeChild(Node node, NodeLocation childLocationToRemove)
-
-