Package graphql.schema.visitor
Class GraphQLSchemaVisitorEnvironmentImpl<T extends GraphQLSchemaElement>
java.lang.Object
graphql.schema.visitor.GraphQLSchemaVisitorEnvironmentImpl<T>
- All Implemented Interfaces:
GraphQLSchemaVisitorEnvironment<T>
- Direct Known Subclasses:
GraphQLSchemaVisitorAdapter.AppliedDirectiveArgumentEnv,GraphQLSchemaVisitorAdapter.AppliedDirectiveEnv,GraphQLSchemaVisitorAdapter.ArgumentEnv,GraphQLSchemaVisitorAdapter.DirectiveEnv,GraphQLSchemaVisitorAdapter.EnumTypeEnv,GraphQLSchemaVisitorAdapter.EnumValueDefinitionEnv,GraphQLSchemaVisitorAdapter.FieldDefinitionEnv,GraphQLSchemaVisitorAdapter.InputObjectFieldEnv,GraphQLSchemaVisitorAdapter.InputObjectTypeEnv,GraphQLSchemaVisitorAdapter.InterfaceTypeEnv,GraphQLSchemaVisitorAdapter.ObjectEnv,GraphQLSchemaVisitorAdapter.ScalarTypeEnv,GraphQLSchemaVisitorAdapter.SchemaElementEnv,GraphQLSchemaVisitorAdapter.UnionTypeEnv
class GraphQLSchemaVisitorEnvironmentImpl<T extends GraphQLSchemaElement>
extends Object
implements GraphQLSchemaVisitorEnvironment<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprivate @NotNull List<GraphQLSchemaElement> buildParentsImpl(Predicate<GraphQLSchemaElement> predicate) changeNode(T schemaElement) Called to change the current node to the specific nodeCalled to delete the current nodeThis will return a value if the visitation call was viaSchemaTransformerThis returns the schema element that led to this element, eg a field is contained in a type which is pointed to be another field say.This returns the schema element that led to this element but withGraphQLModifiedTypewrappers removed.insertAfter(T toInsertAfter) Called to insert the current schema element after the specified schema elementinsertBefore(T toInsertBefore) Called to insert the current schema element before the specified schema elementok()quit()
-
Field Details
-
context
-
-
Constructor Details
-
GraphQLSchemaVisitorEnvironmentImpl
GraphQLSchemaVisitorEnvironmentImpl(TraverserContext<GraphQLSchemaElement> context)
-
-
Method Details
-
getSchema
- Specified by:
getSchemain interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- the schema that is being visited upon
-
getCodeRegistry
Description copied from interface:GraphQLSchemaVisitorEnvironmentThis will return a value if the visitation call was viaSchemaTransformer- Specified by:
getCodeRegistryin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- a code registry builder
-
getElement
- Specified by:
getElementin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- the element that is being visited
-
getLeadingElements
Description copied from interface:GraphQLSchemaVisitorEnvironmentThis returns the schema element that led to this element, eg a field is contained in a type which is pointed to be another field say.- Specified by:
getLeadingElementsin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- a list of schema elements leading to this current element
-
getUnwrappedLeadingElements
Description copied from interface:GraphQLSchemaVisitorEnvironmentThis returns the schema element that led to this element but withGraphQLModifiedTypewrappers removed.- Specified by:
getUnwrappedLeadingElementsin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- a list of schema elements leading to this current element
-
buildParentsImpl
@NotNull private @NotNull List<GraphQLSchemaElement> buildParentsImpl(Predicate<GraphQLSchemaElement> predicate) -
ok
- Specified by:
okin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- When returned the traversal will continue as planned.
-
quit
- Specified by:
quitin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- When returned from a
GraphQLSchemaVisitor's method, indicates exiting the traversal.
-
changeNode
Description copied from interface:GraphQLSchemaVisitorEnvironmentCalled to change the current node to the specific node- Specified by:
changeNodein interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Parameters:
schemaElement- the schema element to change- Returns:
- a control that changes the current node to a the given node
-
deleteNode
Description copied from interface:GraphQLSchemaVisitorEnvironmentCalled to delete the current node- Specified by:
deleteNodein interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Returns:
- a control that deletes the current node
-
insertAfter
Description copied from interface:GraphQLSchemaVisitorEnvironmentCalled to insert the current schema element after the specified schema element- Specified by:
insertAfterin interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Parameters:
toInsertAfter- the schema element to after before- Returns:
- a control that inserts the given node after the current node
-
insertBefore
Description copied from interface:GraphQLSchemaVisitorEnvironmentCalled to insert the current schema element before the specified schema element- Specified by:
insertBeforein interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>- Parameters:
toInsertBefore- the schema element to insert before- Returns:
- a control that inserts the given node before the current node
-