Class CustomScalarType
java.lang.Object
com.graphql_java_generator.plugin.language.impl.AbstractType
com.graphql_java_generator.plugin.language.impl.ScalarType
com.graphql_java_generator.plugin.language.impl.CustomScalarType
- All Implemented Interfaces:
CustomScalar
,Type
- Author:
- etienne-sf
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.graphql_java_generator.plugin.language.Type
Type.GraphQlType, Type.TargetFileType
-
Constructor Summary
ConstructorDescriptionCustomScalarType
(String name, CustomScalarDefinition customScalarDefinition, CommonConfiguration configuration, DocumentParser documentParser) -
Method Summary
Modifier and TypeMethodDescriptionThe java class full name for this type.getTargetFileName
(Type.TargetFileType fileType) Get the filename where this type must be created.boolean
Returns true if this type is a GraphQL Custom Scalar, false otherwiseMethods inherited from class com.graphql_java_generator.plugin.language.impl.ScalarType
getIdentifier, isInputType, isScalar
Methods inherited from class com.graphql_java_generator.plugin.language.impl.AbstractType
addAnnotation, addAnnotation, addImport, addImportForUtilityClasses, getAnnotation, getCamelCaseName, getClassSimpleName, getGraphQlType, getJavaName, getPrefix, getSuffix, setAnnotation, setComments, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.graphql_java_generator.plugin.language.CustomScalar
getCustomScalarDefinition
Methods inherited from interface com.graphql_java_generator.plugin.language.Type
addAnnotation, addAnnotation, addImport, addImportForUtilityClasses, getAnnotation, getAppliedDirectives, getCamelCaseName, getClassSimpleName, getComments, getDataFetcher, getDescription, getField, getFields, getGraphQlType, getIdentifier, getImports, getImportsForUtilityClasses, getJavaName, getName, getPackageName, getRequestType, isEnum, isInputType, isScalar
-
Constructor Details
-
CustomScalarType
public CustomScalarType(String name, CustomScalarDefinition customScalarDefinition, CommonConfiguration configuration, DocumentParser documentParser) - Parameters:
name
- The name of the GraphQL typecustomScalarDefinition
- The custom scalar implementation, as provided by the plugin's configuration. It may be null in some cases (e.g.: when the goal is to generate the schema, as there is no code generation)configuration
- The current plugin configuration, which is accessible through an interface that extendsCommonConfiguration
documentParser
- TheDocumentParser
that has parsed the schema, and so that contains the whole schema definition- See Also:
-
-
Method Details
-
isCustomScalar
public boolean isCustomScalar()Returns true if this type is a GraphQL Custom Scalar, false otherwise- Specified by:
isCustomScalar
in interfaceType
- Overrides:
isCustomScalar
in classScalarType
-
getTargetFileName
Get the filename where this type must be created. Default is to return the name for the Type- Specified by:
getTargetFileName
in interfaceType
-
getClassFullName
Description copied from interface:Type
The java class full name for this type. It may be an interface or a concrete class.- Specified by:
getClassFullName
in interfaceType
- Returns:
- The java classname is usually the name of the type. But in some case, collision my occur with the Java syntax. In this cas, this method will return a classname different from the name
-