public interface GenerationConfig
Devs: add to this interface if you need to introduce a new config property.
| Modifier and Type | Method and Description |
|---|---|
AnnotationStyle |
getAnnotationStyle()
Gets the 'annotationStyle' configuration option.
|
String |
getClassNamePrefix()
Gets the 'getClassNamePrefix' configuration option.
|
String |
getClassNameSuffix()
Gets the 'getClassNameSuffix' configuration option.
|
Class<? extends Annotator> |
getCustomAnnotator()
Gets the 'customAnnotator' configuration option.
|
String |
getCustomDatePattern()
Gets the 'customDatePattern' configuration option
|
String |
getCustomDateTimePattern()
Gets the 'customDateTimePattern' configuration option
|
Class<? extends RuleFactory> |
getCustomRuleFactory()
Gets the 'customRuleFactory' configuration option.
|
String |
getCustomTimePattern()
Gets the 'customTimePattern' configuration option
|
String |
getDateTimeType()
Gets the `dateTimeType` configuration option.
|
String |
getDateType()
Gets the `dateType` configuration option.
|
String[] |
getFileExtensions()
Gets the 'fileExtensions' configuration option.
|
FileFilter |
getFileFilter()
Gets the file filter used to isolate the schema mapping files in the
source directories.
|
InclusionLevel |
getInclusionLevel()
Gets the 'inclusionLevel' option for Jackson1 and Jackson2 serializers.
|
String |
getOutputEncoding()
Gets the 'outputEncoding' configuration option.
|
char[] |
getPropertyWordDelimiters()
Gets the 'propertyWordDelimiters' configuration option.
|
String |
getRefFragmentPathDelimiters()
Gets the `refFragmentPathDelimiters` configuration option.
|
Iterator<URL> |
getSource()
Gets the 'source' configuration option.
|
SourceSortOrder |
getSourceSortOrder()
Gets the 'sourceSortOrder' configuration option.
|
SourceType |
getSourceType()
Gets the 'sourceType' configuration option.
|
File |
getTargetDirectory()
Gets the 'targetDirectory' configuration option.
|
Language |
getTargetLanguage()
Gets the 'targetLanguage' configuration option.
|
String |
getTargetPackage()
Gets the 'targetPackage' configuration option.
|
String |
getTargetVersion()
Gets the 'targetVersion' configuration option.
|
String |
getTimeType()
Gets the `timeType` configuration option.
|
String[] |
getToStringExcludes()
Gets the 'toStringExcludes' configuration option.
|
boolean |
isConstructorsRequiredPropertiesOnly()
Gets the 'constructorsRequiredPropertiesOnly' configuration option
|
boolean |
isFormatDates()
Gets the `formatDates` configuration option
|
boolean |
isFormatDateTimes()
Gets the `formatDateTime` configuration option
|
boolean |
isFormatTimes()
Gets the `formatTimes` configuration option
|
boolean |
isGenerateBuilders()
Gets the 'generateBuilders' configuration option.
|
boolean |
isIncludeAccessors()
Gets the 'includeAccessors' configuration option.
|
boolean |
isIncludeAdditionalProperties()
Gets the 'includeAdditionalProperties' configuration option.
|
boolean |
isIncludeConstructors()
Gets the 'includeConstructors' configuration option.
|
boolean |
isIncludeDynamicAccessors()
Gets the `includeDynamicAccessors` configuration option
|
boolean |
isIncludeDynamicBuilders()
Gets the `includeDynamicBuilders` configuration option.
|
boolean |
isIncludeDynamicGetters()
Gets the `includeDynamicGetters` configuration option.
|
boolean |
isIncludeDynamicSetters()
Gets the `includeDynamicSetters` configuration option.
|
boolean |
isIncludeGetters()
Gets the 'includeGetters' configuration option.
|
boolean |
isIncludeHashcodeAndEquals()
Gets the 'includeHashcodeAndEquals' configuration option.
|
boolean |
isIncludeJsr303Annotations()
Gets the 'includeJsr303Annotations' configuration option.
|
boolean |
isIncludeJsr305Annotations()
Gets the 'includeJsr305Annotations' configuration option.
|
boolean |
isIncludeSetters()
Gets the 'includeSetters' configuration option.
|
boolean |
isIncludeToString()
Gets the 'includeToString' configuration option.
|
boolean |
isInitializeCollections()
Gets the 'initializeCollections' configuration option.
|
boolean |
isParcelable()
Gets the 'parcelable' configuration option.
|
boolean |
isRemoveOldOutput()
Gets the 'removeOldOutput' configuration option.
|
boolean |
isSerializable()
Gets the 'serializable' configuration option.
|
boolean |
isUseBigDecimals()
Gets the 'useBigDecimals' configuration option.
|
boolean |
isUseBigIntegers()
Gets the 'useBigIntegers' configuration option.
|
boolean |
isUseCommonsLang3()
Gets the 'useCommonsLang3' configuration option.
|
boolean |
isUseDoubleNumbers()
Gets the 'useDoubleNumbers' configuration option.
|
boolean |
isUseJodaDates()
Gets the 'useJodaDates' configuration option.
|
boolean |
isUseJodaLocalDates()
Gets the 'useJodaLocalDates' configuration option.
|
boolean |
isUseJodaLocalTimes()
Gets the 'useJodaLocalTimes' configuration option.
|
boolean |
isUseLongIntegers()
Gets the 'useLongIntegers' configuration option.
|
boolean |
isUsePrimitives()
Gets the 'usePrimitives' configuration option.
|
boolean isGenerateBuilders()
withXxx(value) (that return this),
alongside the standard, void-return setters.boolean isUsePrimitives()
long, double
, boolean) instead of wrapper types where possible
when generating bean properties (has the side-effect of making
those properties non-null).Iterator<URL> getSource()
File getTargetDirectory()
String getTargetPackage()
char[] getPropertyWordDelimiters()
boolean isUseLongIntegers()
boolean isUseBigIntegers()
BigInteger instead
of int (or Integer) when
representing the JSON Schema type 'integer'. Note that this
configuration overrides isUseLongIntegers().boolean isUseDoubleNumbers()
boolean isUseBigDecimals()
BigDecimal instead
of float (or Float) when
representing the JSON Schema type 'number'. Note that this
configuration overrides isUseDoubleNumbers().boolean isIncludeHashcodeAndEquals()
hashCode and
equals methods in generated Java types.boolean isIncludeToString()
toString method in
generated Java types.String[] getToStringExcludes()
AnnotationStyle getAnnotationStyle()
Supported values:
jackson1 (apply annotations from the
Jackson 1.x library)
jackson2 (apply annotations from the
Jackson 2.x library)gson (apply annotations from the
gson
library)moshi1 (apply annotations from the
moshi library)none (apply no annotations at all)AnnotatorFactoryInclusionLevel getInclusionLevel()
Supported values
ALWAYSNON_ABSENTNON_DEFAULTNON_EMPTYNON_NULLUSE_DEFAULTSInclusionLevelClass<? extends Annotator> getCustomAnnotator()
getAnnotationStyle()Class<? extends RuleFactory> getCustomRuleFactory()
boolean isIncludeJsr303Annotations()
boolean isIncludeJsr305Annotations()
SourceType getSourceType()
Supported values:
jsonschemajsonboolean isRemoveOldOutput()
String getOutputEncoding()
boolean isUseJodaDates()
org.joda.time.DateTime instead of
Date when adding date type fields to generated
Java types.boolean isUseJodaLocalDates()
org.joda.time.LocalDate instead of string
when adding string type fields with a format of date (not
date-time) to generated Java types.boolean isUseJodaLocalTimes()
org.joda.time.LocalTime instead of string
when adding string type fields with a format of time (not
date-time) to generated Java types.boolean isUseCommonsLang3()
boolean isParcelable()
boolean isSerializable()
FileFilter getFileFilter()
boolean isInitializeCollections()
String getClassNamePrefix()
String getClassNameSuffix()
String[] getFileExtensions()
boolean isIncludeConstructors()
boolean isConstructorsRequiredPropertiesOnly()
boolean isIncludeAdditionalProperties()
boolean isIncludeAccessors()
boolean isIncludeGetters()
boolean isIncludeSetters()
String getTargetVersion()
boolean isIncludeDynamicAccessors()
boolean isIncludeDynamicGetters()
boolean isIncludeDynamicSetters()
boolean isIncludeDynamicBuilders()
String getDateTimeType()
Example values:
org.joda.time.LocalDateTime (Joda)java.time.LocalDateTime (JSR310)null (default behavior)Date when
adding date type fields to generate Java types.String getDateType()
Example values:
org.joda.time.LocalDate (Joda)java.time.LocalDate (JSR310)null (default behavior)String getTimeType()
Example values:
org.joda.time.LocalTime (Joda)java.time.LocalTime (JSR310)null (default behavior)boolean isFormatDates()
date have the
@JsonFormat annotation with pattern set to the
default value of yyyy-MM-ddboolean isFormatTimes()
time have the
@JsonFormat annotation with pattern set to the
default value of HH:mm:ss.SSSboolean isFormatDateTimes()
date-type have the
@JsonFormat annotation with pattern set to the
default value of yyyy-MM-dd'T'HH:mm:ss.SSSZString getCustomDatePattern()
String getCustomTimePattern()
String getCustomDateTimePattern()
String getRefFragmentPathDelimiters()
SourceSortOrder getSourceSortOrder()
Supported values:
OS (Let the OS influence the order the source files are processed.)FILES_FIRST (Case sensitive sort, visit the files first. The source files are processed in a breadth
first sort order.)SUBDIRS_FIRST (Case sensitive sort, visit the sub-directories before the files. The source files are
processed in a depth first sort order.)Language getTargetLanguage()
Supported values:
JAVA (Generate .java source files)SCALA (Generate .scala source files, using scalagen)Copyright © 2017. All rights reserved.