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.

  • Constructor Details

  • Method Details

    • isCopyRuntimeSources

      public boolean isCopyRuntimeSources()
      Specified by:
      isCopyRuntimeSources in interface com.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:
      getCustomScalars in interface com.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:
      getMode in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • getPackageName

      public java.lang.String getPackageName()
      Specified by:
      getPackageName in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • setPackageName

      public void setPackageName​(java.lang.String packageName)
    • isSeparateUtilityClasses

      public boolean isSeparateUtilityClasses()
      Specified by:
      isSeparateUtilityClasses in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • setSeparateUtilityClasses

      public void setSeparateUtilityClasses​(boolean separateUtilityClasses)
    • getSourceEncoding

      public java.lang.String getSourceEncoding()
      Specified by:
      getSourceEncoding in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • setSourceEncoding

      public void setSourceEncoding​(java.lang.String sourceEncoding)
    • getTargetClassFolder

      public java.io.File getTargetClassFolder()
      Specified by:
      getTargetClassFolder in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • getTargetResourceFolder

      public java.io.File getTargetResourceFolder()
      Specified by:
      getTargetResourceFolder in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration