Class AbstractGenerateCodeCommonMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.graphql_java_generator.mavenplugin.AbstractCommonMojo
-
- com.graphql_java_generator.mavenplugin.AbstractGenerateCodeCommonMojo
-
- All Implemented Interfaces:
CommonConfiguration,GenerateCodeCommonConfiguration,org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractGenerateClientCodeMojo,AbstractGenerateServerCodeMojo
public abstract class AbstractGenerateCodeCommonMojo extends AbstractCommonMojo implements GenerateCodeCommonConfiguration
This class is the super class of all Mojos that generates the code, that is theGenerateClientCodeMojo, theGenerateServerCodeMojoand theGraphQLMojomojos. It contains all parameters that are common to these goals. The parameters common to all goal are inherited from theAbstractCommonMojoclass.
This avoids to redeclare each common parameter in each Mojo, including its comment. When a comment is updated, only one update is necessary, instead of updating it in each- Author:
- etienne-sf
-
-
Field Summary
-
Fields inherited from class com.graphql_java_generator.mavenplugin.AbstractCommonMojo
buildContext, ctx, enumPrefix, enumSuffix, inputPrefix, inputSuffix, interfacePrefix, interfaceSuffix, maxTokens, projectHelper, springConfigurationClass, typePrefix, typeSuffix, unionPrefix, unionSuffix
-
Fields 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_SKIP_GENERATION_IF_SCHEMA_HAS_NOT_CHANGED, DEFAULT_SUFFIX
-
Fields inherited from interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
DEFAULT_COPY_RUNTIME_SOURCES, DEFAULT_SEPARATE_UTIL_CLASSES, DEFAULT_SOURCE_ENCODING, DEFAULT_SPRING_BEAN_SUFFIX, DEFAULT_TARGET_RESOURCE_FOLDER, DEFAULT_TARGET_SOURCE_FOLDER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractGenerateCodeCommonMojo(java.lang.Class<?> springConfigurationClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecutePostExecutionTask()java.util.List<CustomScalarDefinition>getCustomScalars()java.lang.StringgetPackageName()java.lang.StringgetSourceEncoding()java.lang.StringgetSpringBeanSuffix()java.io.FilegetTargetClassFolder()java.io.FilegetTargetFolder()java.io.FilegetTargetResourceFolder()java.io.FilegetTargetSourceFolder()booleanisAddRelayConnections()booleanisCopyRuntimeSources()booleanisSeparateUtilityClasses()-
Methods inherited from class com.graphql_java_generator.mavenplugin.AbstractCommonMojo
execute, getEnumPrefix, getEnumSuffix, getInputPrefix, getInputSuffix, getInterfacePrefix, getInterfaceSuffix, getMaxTokens, getProjectDir, getSchemaFileFolder, getSchemaFilePattern, getTemplates, getTypePrefix, getTypeSuffix, getUnionPrefix, getUnionSuffix, isSkipGenerationIfSchemaHasNotChanged
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.graphql_java_generator.plugin.conf.CommonConfiguration
getDefaultTargetSchemaFileName, getEnumPrefix, getEnumSuffix, getInputPrefix, getInputSuffix, getInterfacePrefix, getInterfaceSuffix, getMaxTokens, getProjectDir, getSchemaFileFolder, getSchemaFilePattern, getTemplates, getTypePrefix, getTypeSuffix, getUnionPrefix, getUnionSuffix, isGenerateJacksonAnnotations, isSkipGenerationIfSchemaHasNotChanged, logCommonConfiguration
-
Methods inherited from interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
getMode, getSpringAutoConfigurationPackage, isGenerateUtilityClasses, logConfiguration, logGenerateCodeCommonConfiguration
-
-
-
-
Method Detail
-
getCustomScalars
public java.util.List<CustomScalarDefinition> getCustomScalars()
- Specified by:
getCustomScalarsin interfaceGenerateCodeCommonConfiguration
-
getPackageName
public java.lang.String getPackageName()
- Specified by:
getPackageNamein interfaceGenerateCodeCommonConfiguration
-
getSourceEncoding
public java.lang.String getSourceEncoding()
- Specified by:
getSourceEncodingin interfaceGenerateCodeCommonConfiguration
-
getSpringBeanSuffix
public java.lang.String getSpringBeanSuffix()
- Specified by:
getSpringBeanSuffixin interfaceGenerateCodeCommonConfiguration
-
getTargetFolder
public java.io.File getTargetFolder()
-
getTargetClassFolder
public java.io.File getTargetClassFolder()
- Specified by:
getTargetClassFolderin interfaceGenerateCodeCommonConfiguration
-
getTargetResourceFolder
public java.io.File getTargetResourceFolder()
- Specified by:
getTargetResourceFolderin interfaceGenerateCodeCommonConfiguration
-
getTargetSourceFolder
public java.io.File getTargetSourceFolder()
- Specified by:
getTargetSourceFolderin interfaceGenerateCodeCommonConfiguration
-
isCopyRuntimeSources
public boolean isCopyRuntimeSources()
- Specified by:
isCopyRuntimeSourcesin interfaceGenerateCodeCommonConfiguration
-
isSeparateUtilityClasses
public boolean isSeparateUtilityClasses()
- Specified by:
isSeparateUtilityClassesin interfaceGenerateCodeCommonConfiguration
-
isAddRelayConnections
public boolean isAddRelayConnections()
- Specified by:
isAddRelayConnectionsin interfaceCommonConfiguration
-
executePostExecutionTask
protected void executePostExecutionTask() throws java.io.IOException- Overrides:
executePostExecutionTaskin classAbstractCommonMojo- Throws:
java.io.IOException
-
-