Class GenerateCodeCommonExtension

java.lang.Object
com.graphql_java_generator.gradleplugin.CommonExtension
com.graphql_java_generator.gradleplugin.GenerateCodeCommonExtension
All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration, com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
Direct Known Subclasses:
GenerateClientCodeExtension, GenerateServerCodeExtension

public class GenerateCodeCommonExtension
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 Details

    • targetResourceFolder

      protected java.lang.String targetResourceFolder
      The folder where the generated resources will be generated
    • targetSourceFolder

      protected java.lang.String targetSourceFolder
      The folder where the source code for the generated classes will be generated
  • Constructor Details

  • Method Details

    • isCopyRuntimeSources

      public final boolean isCopyRuntimeSources()
      Specified by:
      isCopyRuntimeSources in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • setCopyRuntimeSources

      public final void setCopyRuntimeSources​(boolean copyRuntimeSources)
    • getCustomScalars

      public final 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 final void setCustomScalars​(com.graphql_java_generator.plugin.conf.CustomScalarDefinition[] customScalars)
    • getMode

      public com.graphql_java_generator.plugin.conf.PluginMode getMode()
      Specified by:
      getMode in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • getPackageName

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

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

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

      public final void setSeparateUtilityClasses​(boolean separateUtilityClasses)
    • getSourceEncoding

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

      public final java.lang.String getSpringBeanSuffix()
      Specified by:
      getSpringBeanSuffix in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • setSpringBeanSuffix

      public final void setSpringBeanSuffix​(java.lang.String springBeanSuffix)
    • setSourceEncoding

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

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

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

      public final void setTargetResourceFolder​(java.lang.String targetResourceFolder)
    • getTargetSourceFolder

      public final java.io.File getTargetSourceFolder()
      Specified by:
      getTargetSourceFolder in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • setTargetSourceFolder

      public final void setTargetSourceFolder​(java.lang.String targetSourceFolder)