public class DefaultGenerationConfig extends Object implements GenerationConfig
Constructor and Description |
---|
DefaultGenerationConfig() |
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()
|
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.
|
Map<String,String> |
getFormatTypeMapping()
Gets the 'formatTypeMapping' configuration option.
|
InclusionLevel |
getInclusionLevel()
Gets the 'inclusionLevel' option for Jackson serializer.
|
String |
getOutputEncoding()
Gets the 'outputEncoding' configuration option.
|
char[] |
getPropertyWordDelimiters()
Gets the 'propertyWordDelimiters' configuration option.
|
String |
getRefFragmentPathDelimiters()
Gets the `refFragmentPathDelimiters` configuration option.
|
Iterator<URL> |
getSource()
Unsupported since no default source is possible.
|
SourceSortOrder |
getSourceSortOrder()
Gets the 'sourceSortOrder' configuration option.
|
SourceType |
getSourceType()
Gets the 'sourceType' configuration option.
|
File |
getTargetDirectory()
Gets the 'targetDirectory' 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 |
isIncludeAdditionalProperties()
Gets the 'includeAdditionalProperties' configuration option.
|
boolean |
isIncludeAllPropertiesConstructor()
Gets the 'constructorsIncludeRequiredPropertiesConstructor' configuration option.
|
boolean |
isIncludeConstructorPropertiesAnnotation()
Gets the 'includeConstructorPropertiesAnnotation' configuration option.
|
boolean |
isIncludeConstructors()
Gets the 'includeConstructors' configuration option.
|
boolean |
isIncludeCopyConstructor()
Gets the 'constructorsIncludeRequiredPropertiesConstructor' 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 |
isIncludeGeneratedAnnotation()
Whether to mark generated classes with the annotation
javax.annotation.@Generated |
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 |
isIncludeRequiredPropertiesConstructor()
Gets the 'constructorsIncludeRequiredPropertiesConstructor' configuration option.
|
boolean |
isIncludeSetters()
Gets the 'includeSetters' configuration option.
|
boolean |
isIncludeToString()
Gets the 'includeToString' configuration option.
|
boolean |
isIncludeTypeInfo()
Gets the 'includeTypeInfo' 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 |
isUseDoubleNumbers()
Gets the 'useDoubleNumbers' configuration option.
|
boolean |
isUseInnerClassBuilders()
If set to true, then the gang of four builder pattern will be used to generate builders on generated classes.
|
boolean |
isUseJakartaValidation()
Gets the 'useJakartaValidation' 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 |
isUseOptionalForGetters()
Gets the 'useOptionalForGetters' configuration option.
|
boolean |
isUsePrimitives()
Gets the 'usePrimitives' configuration option.
|
boolean |
isUseTitleAsClassname()
When
true the title is used as class name. |
public boolean isGenerateBuilders()
GenerationConfig
isGenerateBuilders
in interface GenerationConfig
false
public boolean isIncludeTypeInfo()
GenerationConfig
isIncludeTypeInfo
in interface GenerationConfig
false
public boolean isUsePrimitives()
GenerationConfig
isUsePrimitives
in interface GenerationConfig
false
public Iterator<URL> getSource()
getSource
in interface GenerationConfig
public File getTargetDirectory()
GenerationConfig
getTargetDirectory
in interface GenerationConfig
public String getTargetPackage()
GenerationConfig
getTargetPackage
in interface GenerationConfig
public char[] getPropertyWordDelimiters()
GenerationConfig
getPropertyWordDelimiters
in interface GenerationConfig
public boolean isUseLongIntegers()
GenerationConfig
isUseLongIntegers
in interface GenerationConfig
false
public boolean isUseDoubleNumbers()
GenerationConfig
isUseDoubleNumbers
in interface GenerationConfig
true
public boolean isIncludeHashcodeAndEquals()
GenerationConfig
isIncludeHashcodeAndEquals
in interface GenerationConfig
true
public boolean isIncludeToString()
GenerationConfig
isIncludeToString
in interface GenerationConfig
true
public String[] getToStringExcludes()
GenerationConfig
getToStringExcludes
in interface GenerationConfig
public boolean isUseTitleAsClassname()
GenerationConfig
true
the title is used as class name.isUseTitleAsClassname
in interface GenerationConfig
false
public AnnotationStyle getAnnotationStyle()
GenerationConfig
getAnnotationStyle
in interface GenerationConfig
AnnotationStyle.JACKSON2
AnnotatorFactory
public InclusionLevel getInclusionLevel()
GenerationConfig
getInclusionLevel
in interface GenerationConfig
InclusionLevel.NON_NULL
InclusionLevel
public Class<? extends Annotator> getCustomAnnotator()
getCustomAnnotator
in interface GenerationConfig
GenerationConfig.getAnnotationStyle()
public Class<? extends RuleFactory> getCustomRuleFactory()
GenerationConfig
getCustomRuleFactory
in interface GenerationConfig
public boolean isIncludeJsr303Annotations()
GenerationConfig
isIncludeJsr303Annotations
in interface GenerationConfig
false
public boolean isIncludeJsr305Annotations()
GenerationConfig
isIncludeJsr305Annotations
in interface GenerationConfig
public boolean isUseOptionalForGetters()
GenerationConfig
isUseOptionalForGetters
in interface GenerationConfig
Optional
as return type for
getters of non-required fields.public SourceType getSourceType()
GenerationConfig
getSourceType
in interface GenerationConfig
SourceType.JSONSCHEMA
public String getOutputEncoding()
GenerationConfig
getOutputEncoding
in interface GenerationConfig
public boolean isRemoveOldOutput()
GenerationConfig
isRemoveOldOutput
in interface GenerationConfig
public boolean isUseJodaDates()
GenerationConfig
isUseJodaDates
in interface GenerationConfig
public boolean isUseJodaLocalDates()
GenerationConfig
isUseJodaLocalDates
in interface GenerationConfig
public boolean isUseJodaLocalTimes()
GenerationConfig
isUseJodaLocalTimes
in interface GenerationConfig
public boolean isParcelable()
GenerationConfig
isParcelable
in interface GenerationConfig
false
public boolean isSerializable()
GenerationConfig
isSerializable
in interface GenerationConfig
false
public FileFilter getFileFilter()
GenerationConfig
getFileFilter
in interface GenerationConfig
public boolean isInitializeCollections()
GenerationConfig
isInitializeCollections
in interface GenerationConfig
true
public String getClassNamePrefix()
GenerationConfig
getClassNamePrefix
in interface GenerationConfig
public String getClassNameSuffix()
GenerationConfig
getClassNameSuffix
in interface GenerationConfig
public String[] getFileExtensions()
GenerationConfig
getFileExtensions
in interface GenerationConfig
public boolean isUseBigIntegers()
GenerationConfig
isUseBigIntegers
in interface GenerationConfig
false
public boolean isUseBigDecimals()
GenerationConfig
isUseBigDecimals
in interface GenerationConfig
false
public boolean isIncludeConstructors()
GenerationConfig
isIncludeConstructors
in interface GenerationConfig
false
public boolean isConstructorsRequiredPropertiesOnly()
GenerationConfig
GenerationConfig.isIncludeAllPropertiesConstructor()
and off the GenerationConfig.isIncludeAllPropertiesConstructor()
configuration options.
It is specifically tied to the GenerationConfig.isIncludeConstructors()
property, and will do nothing if that property is not enabledisConstructorsRequiredPropertiesOnly
in interface GenerationConfig
false
public boolean isIncludeRequiredPropertiesConstructor()
GenerationConfig
GenerationConfig.isIncludeConstructors()
configuration option and is incompatible with GenerationConfig.isConstructorsRequiredPropertiesOnly()
, and will have no effect
if GenerationConfig.isIncludeConstructors()
is not set to true. If GenerationConfig.isIncludeConstructors()
is set to true then this configuration determines
whether the resulting object should include a constructor with only the required properties as parameters.isIncludeRequiredPropertiesConstructor
in interface GenerationConfig
false
public boolean isIncludeAllPropertiesConstructor()
GenerationConfig
GenerationConfig.isIncludeConstructors()
configuration option and is incompatible with GenerationConfig.isConstructorsRequiredPropertiesOnly()
, and will have no effect
if GenerationConfig.isIncludeConstructors()
is not set to true. If GenerationConfig.isIncludeConstructors()
is set to true then this configuration determines
whether the resulting object should include a constructor with all listed properties as parameters.isIncludeAllPropertiesConstructor
in interface GenerationConfig
true
public boolean isIncludeCopyConstructor()
GenerationConfig
GenerationConfig.isIncludeConstructors()
configuration option and is incompatible with GenerationConfig.isConstructorsRequiredPropertiesOnly()
, and will have no effect
if GenerationConfig.isIncludeConstructors()
is not set to true. If GenerationConfig.isIncludeConstructors()
is set to true then this configuration determines
whether the resulting object should include a constructor the class itself as a parameter, with the expectation that all properties from the
originating class will assigned to the new class.isIncludeCopyConstructor
in interface GenerationConfig
false
public boolean isIncludeAdditionalProperties()
GenerationConfig
isIncludeAdditionalProperties
in interface GenerationConfig
true
public boolean isIncludeGetters()
GenerationConfig
isIncludeGetters
in interface GenerationConfig
true
public boolean isIncludeSetters()
GenerationConfig
isIncludeSetters
in interface GenerationConfig
true
public String getTargetVersion()
GenerationConfig
getTargetVersion
in interface GenerationConfig
1.6
public boolean isIncludeDynamicAccessors()
GenerationConfig
isIncludeDynamicAccessors
in interface GenerationConfig
false
public boolean isIncludeDynamicGetters()
GenerationConfig
isIncludeDynamicGetters
in interface GenerationConfig
false
public boolean isIncludeDynamicSetters()
GenerationConfig
isIncludeDynamicSetters
in interface GenerationConfig
false
public boolean isIncludeDynamicBuilders()
GenerationConfig
isIncludeDynamicBuilders
in interface GenerationConfig
false
public String getDateTimeType()
GenerationConfig
Example values:
org.joda.time.LocalDateTime
(Joda)java.time.LocalDateTime
(JSR310)null
(default behavior)getDateTimeType
in interface GenerationConfig
Date
when
adding date type fields to generate Java types.public String getDateType()
GenerationConfig
Example values:
org.joda.time.LocalDate
(Joda)java.time.LocalDate
(JSR310)null
(default behavior)getDateType
in interface GenerationConfig
public String getTimeType()
GenerationConfig
Example values:
org.joda.time.LocalTime
(Joda)java.time.LocalTime
(JSR310)null
(default behavior)getTimeType
in interface GenerationConfig
public boolean isFormatDateTimes()
GenerationConfig
isFormatDateTimes
in interface GenerationConfig
false
public boolean isFormatDates()
GenerationConfig
isFormatDates
in interface GenerationConfig
false
public boolean isFormatTimes()
GenerationConfig
isFormatTimes
in interface GenerationConfig
false
public String getRefFragmentPathDelimiters()
GenerationConfig
getRefFragmentPathDelimiters
in interface GenerationConfig
public String getCustomDatePattern()
GenerationConfig
getCustomDatePattern
in interface GenerationConfig
public String getCustomTimePattern()
GenerationConfig
getCustomTimePattern
in interface GenerationConfig
public String getCustomDateTimePattern()
GenerationConfig
getCustomDateTimePattern
in interface GenerationConfig
public SourceSortOrder getSourceSortOrder()
GenerationConfig
getSourceSortOrder
in interface GenerationConfig
SourceSortOrder.OS
public Map<String,String> getFormatTypeMapping()
GenerationConfig
getFormatTypeMapping
in interface GenerationConfig
Collections.emptyMap()
public boolean isUseInnerClassBuilders()
GenerationConfig
GenerationConfig.isGenerateBuilders()
method. If the GenerationConfig.isGenerateBuilders()
is false,
then this property will not do anything.isUseInnerClassBuilders
in interface GenerationConfig
false
public boolean isIncludeConstructorPropertiesAnnotation()
GenerationConfig
isIncludeConstructorPropertiesAnnotation
in interface GenerationConfig
false
public boolean isIncludeGeneratedAnnotation()
GenerationConfig
javax.annotation.@Generated
isIncludeGeneratedAnnotation
in interface GenerationConfig
false
public boolean isUseJakartaValidation()
GenerationConfig
GenerationConfig.isIncludeJsr303Annotations()
configuration option.
If the GenerationConfig.isIncludeJsr303Annotations()
returns false
, then this configuration option will not affect anything.isUseJakartaValidation
in interface GenerationConfig
false
Copyright © 2022. All rights reserved.