Uses of Interface
org.instancio.settings.SettingKey
Package
Description
Instancio public-facing APIs; for usage examples see
Instancio
.Provides classes for overriding settings at runtime.
-
Uses of SettingKey in org.instancio
Modifier and TypeMethodDescription<V> CartesianProductApi
<T> CartesianProductApi.withSetting
(SettingKey<V> key, V value) Override setting for the givenkey
with the specifiedvalue
.<V> InstancioApi
<T> InstancioApi.withSetting
(SettingKey<V> key, V value) Override setting for the givenkey
with the specifiedvalue
.<V> InstancioOperations
<T> InstancioOperations.withSetting
(SettingKey<V> key, V value) Override setting for the givenkey
with the specifiedvalue
. -
Uses of SettingKey in org.instancio.settings
Modifier and TypeFieldDescriptionstatic final SettingKey
<AfterGenerate> Keys.AFTER_GENERATE_HINT
Specifies the default value of theAfterGenerate
hint supplied from custom generators to the engine; default isAfterGenerate.POPULATE_NULLS_AND_DEFAULT_PRIMITIVES
; property namehint.after.generate
.static final SettingKey
<Boolean> Specifies whether anull
can be generated for array elements; default isfalse
; property namearray.elements.nullable
.static final SettingKey
<Integer> Keys.ARRAY_MAX_LENGTH
Specifies maximum length for arrays; default is 6; property namearray.max.length
.static final SettingKey
<Integer> Keys.ARRAY_MIN_LENGTH
Specifies minimum length for arrays; default is 2; property namearray.min.length
.static final SettingKey
<Boolean> Keys.ARRAY_NULLABLE
Specifies whether a null can be generated for arrays; default isfalse
; property namearray.nullable
.static final SettingKey
<AssignmentType> Keys.ASSIGNMENT_TYPE
Specifies whether to assign values using fields or methods; default isAssignmentType.FIELD
; property nameassignment.type
.static final SettingKey
<Boolean> Specifies whether values should be generated based on Jakarta Bean Validation 3.0 annotations, if present; default isfalse
; property namebean.validation.api.enabled
.static final SettingKey
<BeanValidationTarget> Specifies whether Bean Validation annotations are declared on fields or getters; default isBeanValidationTarget.FIELD
; property namebean.validation.target
.static final SettingKey
<Integer> Keys.BIG_DECIMAL_SCALE
Specifies thescale
for generatingBigDecimal
; default is2
; property namebigdecimal.scale
.static final SettingKey
<Boolean> Keys.BOOLEAN_NULLABLE
Specifies whether anull
can be generated for Boolean type; default isfalse
; property nameboolean.nullable
.static final SettingKey
<Byte> Keys.BYTE_MAX
Specifies maximum value for bytes; default is 127; property namebyte.max
.static final SettingKey
<Byte> Keys.BYTE_MIN
Specifies minimum value for bytes; default is 1; property namebyte.min
.static final SettingKey
<Boolean> Keys.BYTE_NULLABLE
Specifies whether anull
can be generated for Byte type; default isfalse
; property namebyte.nullable
.static final SettingKey
<Boolean> Keys.CHARACTER_NULLABLE
Specifies whether anull
can be generated for Character type; default isfalse
; property namecharacter.nullable
.static final SettingKey
<Boolean> Specifies whether anull
can be generated for collection elements; default isfalse
; property namecollection.elements.nullable
.static final SettingKey
<Integer> Keys.COLLECTION_MAX_SIZE
Specifies maximum size for collections; default is 6; property namecollection.max.size
.static final SettingKey
<Integer> Keys.COLLECTION_MIN_SIZE
Specifies minimum size for collections; default is 2; property namecollection.min.size
.static final SettingKey
<Boolean> Keys.COLLECTION_NULLABLE
Specifies whether anull
can be generated for collections; default isfalse
; property namecollection.nullable
.static final SettingKey
<Double> Keys.DOUBLE_MAX
Specifies maximum value for doubles; default is 10000; property namedouble.max
.static final SettingKey
<Double> Keys.DOUBLE_MIN
Specifies minimum value for doubles; default is 1; property namedouble.min
.static final SettingKey
<Boolean> Keys.DOUBLE_NULLABLE
Specifies whether anull
can be generated for Double type; default isfalse
; property namedouble.nullable
.static final SettingKey
<Boolean> Keys.FAIL_ON_ERROR
Specifies whether internal exceptions should be propagated up; default isfalse
; property namefail.on.error
.static final SettingKey
<Float> Keys.FLOAT_MAX
Specifies maximum value for floats; default is 10000; property namefloat.max
.static final SettingKey
<Float> Keys.FLOAT_MIN
Specifies minimum value for floats; default is 1; property namefloat.min
.static final SettingKey
<Boolean> Keys.FLOAT_NULLABLE
Specifies whether anull
can be generated for Float type; default isfalse
; property namefloat.nullable
.static final SettingKey
<Integer> Keys.INTEGER_MAX
Specifies maximum value for integers; default is 10000; property nameinteger.max
.static final SettingKey
<Integer> Keys.INTEGER_MIN
Specifies minimum value for integers; default is 1; property nameinteger.min
.static final SettingKey
<Boolean> Keys.INTEGER_NULLABLE
Specifies whether anull
can be generated for Integer type; default isfalse
; property nameinteger.nullable
.static final SettingKey
<Boolean> Keys.JPA_ENABLED
Specifies whether values should be generated based on JPA annotations, such as@Column.length
; default isfalse
; property namejpa.enabled
.static final SettingKey
<Long> Keys.LONG_MAX
Specifies maximum value for longs; default is 10000; property namelong.max
.static final SettingKey
<Long> Keys.LONG_MIN
Specifies minimum value for longs; default is 1; property namelong.min
.static final SettingKey
<Boolean> Keys.LONG_NULLABLE
Specifies whether anull
can be generated for Long type; default isfalse
; property namelong.nullable
.static final SettingKey
<Boolean> Keys.MAP_KEYS_NULLABLE
Specifies whether anull
can be generated for map keys; default isfalse
; property namemap.keys.nullable
.static final SettingKey
<Integer> Keys.MAP_MAX_SIZE
Specifies maximum size for maps; default is 6; property namemap.max.size
.static final SettingKey
<Integer> Keys.MAP_MIN_SIZE
Specifies minimum size for maps; default is 2; property namemap.min.size
.static final SettingKey
<Boolean> Keys.MAP_NULLABLE
Specifies whether anull
can be generated for maps; default isfalse
; property namemap.nullable
.static final SettingKey
<Boolean> Keys.MAP_VALUES_NULLABLE
Specifies whether anull
can be generated for map values; default isfalse
; property namemap.values.nullable
.static final SettingKey
<Integer> Keys.MAX_DEPTH
Specifies the maximum depth of the generated object tree; default is8
; property namemax.depth
.static final SettingKey
<Mode> Keys.MODE
Specifies the mode: strict (unused selectors will trigger an exception) or lenient; default isMode.STRICT
; property namemode
.static final SettingKey
<OnSetFieldError> Keys.ON_SET_FIELD_ERROR
Specifies what should happen if an error occurs setting a field's value; default isOnSetFieldError.IGNORE
; property nameon.set.field.error
.static final SettingKey
<OnSetMethodError> Keys.ON_SET_METHOD_ERROR
Specifies what should happen if an error occurs invoking a setter; default isOnSetMethodError.ASSIGN_FIELD
; property nameon.set.method.error
.static final SettingKey
<OnSetMethodNotFound> Specifies what should happen if a setter method for a field cannot be resolved; default isOnSetMethodNotFound.ASSIGN_FIELD
; property nameon.set.method.not.found
.static final SettingKey
<OnSetMethodUnmatched> Specifies what should happen if a setter without a matching field is encountered; default isOnSetMethodUnmatched.IGNORE
; property nameon.set.method.unmatched
.static final SettingKey
<Boolean> Specifies whether initialised fields can be overwritten by the engine to random values; default istrue
; property nameoverwrite.existing.values
.static final SettingKey
<Long> Keys.SEED
Specifies the seed value; default isnull
; property nameseed
.static final SettingKey
<Boolean> Keys.SET_BACK_REFERENCES
Specifies whether back references should be set for cyclic classes; default isfalse
(cycles are terminated withnull
); property nameset.back.references
.static final SettingKey
<Integer> Specifies modifier exclusions for setter-methods; default is0
(no exclusions); property namesetter.exclude.modifier
.static final SettingKey
<SetterStyle> Keys.SETTER_STYLE
Indicates the naming convention of setter methods to use; default isSetterStyle.SET
; property namesetter.style
.static final SettingKey
<Short> Keys.SHORT_MAX
Specifies maximum value for shorts; default is 10000; property nameshort.max
.static final SettingKey
<Short> Keys.SHORT_MIN
Specifies minimum value for shorts; default is 1; property nameshort.min
.static final SettingKey
<Boolean> Keys.SHORT_NULLABLE
Specifies whether anull
can be generated for Short type; default isfalse
; property nameshort.nullable
.static final SettingKey
<Boolean> Keys.STRING_ALLOW_EMPTY
Specifies whether an empty string can be generated; default isfalse
; property namestring.allow.empty
.static final SettingKey
<Boolean> Specifies whether generated Strings should be prefixed with field names; default isfalse
; property namestring.field.prefix.enabled
.static final SettingKey
<Integer> Keys.STRING_MAX_LENGTH
Specifies maximum length of strings; default is 10; property namestring.max.length
.static final SettingKey
<Integer> Keys.STRING_MIN_LENGTH
Specifies minimum length of strings; default is 3; property namestring.min.length
.static final SettingKey
<Boolean> Keys.STRING_NULLABLE
Specifies whether anull
can be generated for String type; default isfalse
; property namestring.nullable
.Modifier and TypeMethodDescriptionSettingKey.SettingKeyBuilder.create()
Returns the created setting key.static <T> SettingKey
<T> Returns aSettingKey
instance with the given property key.Modifier and TypeMethodDescriptionstatic List
<SettingKey<Object>> Keys.all()
Returns all keys supported by Instancio.Modifier and TypeMethodDescription<T> T
Settings.get
(@NotNull SettingKey<T> key) Get setting value for given key.<T> Settings
Settings.set
(SettingKey<T> key, T value) Set the setting with the given key to the specified value.