Class CommonExtension
java.lang.Object
com.graphql_java_generator.gradleplugin.CommonExtension
- All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration
- Direct Known Subclasses:
GenerateCodeCommonExtension,GenerateGraphQLSchemaExtension
public class CommonExtension
extends Object
implements com.graphql_java_generator.plugin.conf.CommonConfiguration
This class contain the parameters that are common to all Gradle Extensions for this plugin, that is the parameters that are common to all the tasks of this plugin. The extensions are used here to define the default values for the task parameters
This avoids to redeclare each common parameter in each Extension, including its comment. When a comment is updated, only one update is necessary, instead of updating it in each Extension.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.gradle.api.ProjectbooleanFields inherited from interface com.graphql_java_generator.plugin.conf.CommonConfiguration
DEFAULT_ADD_RELAY_CONNECTIONS, DEFAULT_MAX_TOKENS, DEFAULT_PACKAGE_NAME, DEFAULT_PREFIX, DEFAULT_SCHEMA_FILE_FOLDER, DEFAULT_SCHEMA_FILE_PATTERN, DEFAULT_SCHEMA_SUB_FOLDER, DEFAULT_SKIP_GENERATION_IF_SCHEMA_HAS_NOT_CHANGED, DEFAULT_SUFFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAn optional prefix to add to the classnames of the generated java classes for GraphQL enums.An optional suffix to add to the classnames of the generated java classes for GraphQL enums.An optional prefix to add to the classnames of the generated java classes for GraphQL input objects.An optional suffix to add to the classnames of the generated java classes for GraphQL input objects.An optional prefix to add to the classnames of the generated java classes for GraphQL interfaces.An optional suffix to add to the classnames of the generated java classes for GraphQL interfaces.An optional prefix to add to the classnames of the generated java classes for GraphQL types.An optional suffix to add to the classnames of the generated java classes for GraphQL types.An optional prefix to add to the classnames of the generated java classes for GraphQL unions.An optional suffix to add to the classnames of the generated java classes for GraphQL unions.booleanbooleanbooleanDeprecated.voidfinal voidsetAddRelayConnections(boolean addRelayConnections) voidsetEnumPrefix(String enumPrefix) voidsetEnumSuffix(String enumSuffix) voidsetInitialized(boolean initialized) voidsetInputPrefix(String inputPrefix) voidsetInputSuffix(String inputSuffix) voidsetInterfacePrefix(String interfacePrefix) voidsetInterfaceSuffix(String interfaceSuffix) voidsetMaxTokens(Integer maxTokens) final voidsetSchemaFileFolder(String schemaFileFolder) final voidsetSchemaFilePattern(String schemaFilePattern) final voidsetSkipGenerationIfSchemaHasNotChanged(boolean skipGenerationIfSchemaHasNotChanged) final voidsetTemplates(Map<String, String> templates) voidsetTypePrefix(String typePrefix) voidsetTypeSuffix(String typeSuffix) voidsetUnionPrefix(String unionPrefix) voidsetUnionSuffix(String unionSuffix) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.graphql_java_generator.plugin.conf.CommonConfiguration
getDefaultTargetSchemaFileName, getTargetSchemaSubFolder, isGenerateJacksonAnnotations, logCommonConfiguration
-
Field Details
-
project
protected final org.gradle.api.Project project -
skipGenerationIfSchemaHasNotChanged
public boolean skipGenerationIfSchemaHasNotChanged
-
-
Constructor Details
-
CommonExtension
public CommonExtension(org.gradle.api.Project project)
-
-
Method Details
-
getEnumPrefix
An optional prefix to add to the classnames of the generated java classes for GraphQL enums. The prefix is added at the beginning of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getEnumPrefixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setEnumPrefix
-
getEnumSuffix
An optional suffix to add to the classnames of the generated java classes for GraphQL enums. The suffix is added at the end of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getEnumSuffixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setEnumSuffix
-
isInitialized
public boolean isInitialized() -
setInitialized
public void setInitialized(boolean initialized) -
getInputPrefix
An optional prefix to add to the classnames of the generated java classes for GraphQL input objects. The prefix is added at the beginning of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getInputPrefixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setInputPrefix
-
getInputSuffix
An optional suffix to add to the classnames of the generated java classes for GraphQL input objects. The suffix is added at the end of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getInputSuffixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setInputSuffix
-
getMaxTokens
- Specified by:
getMaxTokensin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setMaxTokens
-
getProjectDir
- Specified by:
getProjectDirin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getSchemaFileFolder
- Specified by:
getSchemaFileFolderin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setSchemaFileFolder
-
getSchemaFilePattern
- Specified by:
getSchemaFilePatternin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setSchemaFilePattern
-
getTemplates
- Specified by:
getTemplatesin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setTemplates
-
getTypePrefix
An optional prefix to add to the classnames of the generated java classes for GraphQL types. The prefix is added at the beginning of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getTypePrefixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setTypePrefix
-
getTypeSuffix
An optional suffix to add to the classnames of the generated java classes for GraphQL types. The suffix is added at the end of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getTypeSuffixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setTypeSuffix
-
getUnionPrefix
An optional prefix to add to the classnames of the generated java classes for GraphQL unions. The prefix is added at the beginning of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getUnionPrefixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setUnionPrefix
-
getUnionSuffix
An optional suffix to add to the classnames of the generated java classes for GraphQL unions. The suffix is added at the end of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getUnionSuffixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setUnionSuffix
-
getInterfacePrefix
An optional prefix to add to the classnames of the generated java classes for GraphQL interfaces. The prefix is added at the beginning of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getInterfacePrefixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setInterfacePrefix
-
getInterfaceSuffix
An optional suffix to add to the classnames of the generated java classes for GraphQL interfaces. The suffix is added at the end of the java classname, and must be compatible with java naming rules (no space, dot, comma, etc.)- Specified by:
getInterfaceSuffixin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setInterfaceSuffix
-
isAddRelayConnections
public boolean isAddRelayConnections()- Specified by:
isAddRelayConnectionsin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setAddRelayConnections
public final void setAddRelayConnections(boolean addRelayConnections) -
isSkipGenerationIfSchemaHasNotChanged
Deprecated.- Specified by:
isSkipGenerationIfSchemaHasNotChangedin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setSkipGenerationIfSchemaHasNotChanged
public final void setSkipGenerationIfSchemaHasNotChanged(boolean skipGenerationIfSchemaHasNotChanged) -
logConfiguration
public void logConfiguration()- Specified by:
logConfigurationin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-