Class EnumType
java.lang.Object
com.graphql_java_generator.plugin.language.impl.AbstractType
com.graphql_java_generator.plugin.language.impl.EnumType
- All Implemented Interfaces:
Type
This class is the image for a graphql Enum
- 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
ConstructorDescriptionEnumType
(String name, CommonConfiguration configuration, DocumentParser documentParser) -
Method Summary
Modifier and TypeMethodDescriptionAn enum has no identifier.Returns the package's name where the GraphQL objects from the GraphQL schema must be generated.protected String
protected String
boolean
Returns true if this type is a GraphQL Custom Scalar, false otherwiseboolean
isEnum()
Returns true if this type is a GraphQL enum, false otherwiseboolean
Returns true if this type is a GraphQL InputObjectType, false otherwiseboolean
isScalar()
Returns true if this type is a GraphQL Scalar (custom or not), false otherwiseMethods inherited from class com.graphql_java_generator.plugin.language.impl.AbstractType
addAnnotation, addAnnotation, addImport, addImportForUtilityClasses, getAnnotation, getCamelCaseName, getClassSimpleName, getGraphQlType, getJavaName, 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.Type
getAppliedDirectives, getClassFullName, getComments, getDataFetcher, getDescription, getField, getFields, getImports, getImportsForUtilityClasses, getName, getRequestType, getTargetFileName
-
Constructor Details
-
EnumType
- Parameters:
name
- The name of this enum typeconfiguration
- 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
-
-
Method Details
-
getIdentifier
An enum has no identifier.- Returns:
- null
-
getPackageName
Description copied from interface:Type
Returns the package's name where the GraphQL objects from the GraphQL schema must be generated.- Returns:
-
isInputType
public boolean isInputType()Description copied from interface:Type
Returns true if this type is a GraphQL InputObjectType, false otherwise -
isCustomScalar
public boolean isCustomScalar()Description copied from interface:Type
Returns true if this type is a GraphQL Custom Scalar, false otherwise -
isEnum
public boolean isEnum()Description copied from interface:Type
Returns true if this type is a GraphQL enum, false otherwise -
isScalar
public boolean isScalar()Description copied from interface:Type
Returns true if this type is a GraphQL Scalar (custom or not), false otherwise -
getPrefix
- Overrides:
getPrefix
in classAbstractType
-
getSuffix
- Overrides:
getSuffix
in classAbstractType
-