Class GenerateCodeCommon
java.lang.Object
com.graphql_java_generator.gradleplugin.CommonExtension
com.graphql_java_generator.gradleplugin.GenerateCodeCommon
- All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration,com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
- Direct Known Subclasses:
GenerateClientCodeExtension,GenerateServerCodeExtension
public abstract class GenerateCodeCommon extends CommonExtension implements com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
This class is the super class of all Gradle Extensions that generate code, that is the
GenerateClientCodeExtension, the GenerateServerCodeExtension and the GraphQLExtension
extensions. It contains all parameters that are common to these tasks. The parameters common to all tasks are
inherited from the CommonExtension class.
This avoids to redeclare each common parameter in each task, including its comment. When a comment is updated, only one update is necessary, instead of updating it in each.
-
Field Summary
Fields inherited from class com.graphql_java_generator.gradleplugin.CommonExtension
addRelayConnections, project, skipGenerationIfSchemaHasNotChanged -
Constructor Summary
Constructors Constructor Description GenerateCodeCommon(org.gradle.api.Project project) -
Method Summary
Modifier and Type Method Description java.util.List<com.graphql_java_generator.plugin.conf.CustomScalarDefinition>getCustomScalars()abstract com.graphql_java_generator.plugin.conf.PluginModegetMode()java.lang.StringgetPackageName()java.lang.StringgetSourceEncoding()java.io.FilegetTargetClassFolder()java.io.FilegetTargetResourceFolder()booleanisCopyRuntimeSources()booleanisSeparateUtilityClasses()voidsetCopyRuntimeSources(boolean copyRuntimeSources)voidsetCustomScalars(com.graphql_java_generator.plugin.conf.CustomScalarDefinition[] customScalars)voidsetPackageName(java.lang.String packageName)voidsetSeparateUtilityClasses(boolean separateUtilityClasses)voidsetSourceEncoding(java.lang.String sourceEncoding)Methods inherited from class com.graphql_java_generator.gradleplugin.CommonExtension
getPluginLogger, getProjectDir, getSchemaFileFolder, getSchemaFilePattern, getTemplates, isAddRelayConnections, isSkipGenerationIfSchemaHasNotChanged, logConfiguration, setAddRelayConnections, setSchemaFileFolder, setSchemaFilePattern, setSkipGenerationIfSchemaHasNotChanged, setTemplatesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GenerateCodeCommon
public GenerateCodeCommon(org.gradle.api.Project project)
-
-
Method Details
-
isCopyRuntimeSources
public boolean isCopyRuntimeSources()- Specified by:
isCopyRuntimeSourcesin interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
setCopyRuntimeSources
public void setCopyRuntimeSources(boolean copyRuntimeSources) -
getCustomScalars
public java.util.List<com.graphql_java_generator.plugin.conf.CustomScalarDefinition> getCustomScalars()- Specified by:
getCustomScalarsin interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
setCustomScalars
public void setCustomScalars(com.graphql_java_generator.plugin.conf.CustomScalarDefinition[] customScalars) -
getMode
public abstract com.graphql_java_generator.plugin.conf.PluginMode getMode()- Specified by:
getModein interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
getPackageName
public java.lang.String getPackageName()- Specified by:
getPackageNamein interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
setPackageName
public void setPackageName(java.lang.String packageName) -
isSeparateUtilityClasses
public boolean isSeparateUtilityClasses()- Specified by:
isSeparateUtilityClassesin interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
setSeparateUtilityClasses
public void setSeparateUtilityClasses(boolean separateUtilityClasses) -
getSourceEncoding
public java.lang.String getSourceEncoding()- Specified by:
getSourceEncodingin interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
setSourceEncoding
public void setSourceEncoding(java.lang.String sourceEncoding) -
getTargetClassFolder
public java.io.File getTargetClassFolder()- Specified by:
getTargetClassFolderin interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-
getTargetResourceFolder
public java.io.File getTargetResourceFolder()- Specified by:
getTargetResourceFolderin interfacecom.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
-