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 viaSchemaTransformer
This 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 withGraphQLModifiedType
wrappers 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:
getSchema
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- the schema that is being visited upon
-
getCodeRegistry
Description copied from interface:GraphQLSchemaVisitorEnvironment
This will return a value if the visitation call was viaSchemaTransformer
- Specified by:
getCodeRegistry
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- a code registry builder
-
getElement
- Specified by:
getElement
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- the element that is being visited
-
getLeadingElements
Description copied from interface:GraphQLSchemaVisitorEnvironment
This 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:
getLeadingElements
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- a list of schema elements leading to this current element
-
getUnwrappedLeadingElements
Description copied from interface:GraphQLSchemaVisitorEnvironment
This returns the schema element that led to this element but withGraphQLModifiedType
wrappers removed.- Specified by:
getUnwrappedLeadingElements
in 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:
ok
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- When returned the traversal will continue as planned.
-
quit
- Specified by:
quit
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- When returned from a
GraphQLSchemaVisitor
's method, indicates exiting the traversal.
-
changeNode
Description copied from interface:GraphQLSchemaVisitorEnvironment
Called to change the current node to the specific node- Specified by:
changeNode
in 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:GraphQLSchemaVisitorEnvironment
Called to delete the current node- Specified by:
deleteNode
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Returns:
- a control that deletes the current node
-
insertAfter
Description copied from interface:GraphQLSchemaVisitorEnvironment
Called to insert the current schema element after the specified schema element- Specified by:
insertAfter
in 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:GraphQLSchemaVisitorEnvironment
Called to insert the current schema element before the specified schema element- Specified by:
insertBefore
in interfaceGraphQLSchemaVisitorEnvironment<T extends GraphQLSchemaElement>
- Parameters:
toInsertBefore
- the schema element to insert before- Returns:
- a control that inserts the given node before the current node
-