Class DirectiveRegistryImpl
java.lang.Object
com.graphql_java_generator.client.directive.DirectiveRegistryImpl
- All Implemented Interfaces:
DirectiveRegistry
- Author:
- etienne-sf
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DirectiveRegistryAs we may have or not have Spring at runtime, we manually manage a singleton. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDirective(String name) Retrieves the registeredGraphQLScalarTypefor this GraphQL CustomScalar.voidThis method registers allGraphQLScalarTypethat are declared as SpringComponent.voidregisterDirective(Directive type) Manually register one GraphQL directive.
-
Field Details
-
directiveRegistry
As we may have or not have Spring at runtime, we manually manage a singleton. This field is private, and should only be accessed through.invalid reference
#getDirectiveRegistry()
-
-
Constructor Details
-
DirectiveRegistryImpl
public DirectiveRegistryImpl()
-
-
Method Details
-
registerAllDirectives
public void registerAllDirectives()This method registers allGraphQLScalarTypethat are declared as SpringComponent. Another way to registerGraphQLScalarTypeis to call the.invalid reference
#registerGraphQLScalarType(GraphQLScalarType)
This implementation works only if this class has been loaded as a Spring Component.- Specified by:
registerAllDirectivesin interfaceDirectiveRegistry
-
registerDirective
Manually register one GraphQL directive.- Specified by:
registerDirectivein interfaceDirectiveRegistry- Parameters:
type-
-
getDirective
Retrieves the registeredGraphQLScalarTypefor this GraphQL CustomScalar.- Specified by:
getDirectivein interfaceDirectiveRegistry- Parameters:
name-- Returns:
- the
Directive, or null if no directive has been registered for the given name
-