TransformerConfiguration

io.scalaland.chimney.dsl.TransformerConfiguration
See theTransformerConfiguration companion object
final class TransformerConfiguration[Flags <: TransformerFlags]

Type-level set of derivation flags that can be shared between derivations through implicit scope.

Type parameters

Flags

type-level encoded flags

Attributes

See also
Since

0.6.0

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def disableBeanGetters: UpdateFlag[Disable[BeanGetters, Flags]]

Disable Java Beans naming convention (.getName, .isName) on From.

Disable Java Beans naming convention (.getName, .isName) on From.

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableBeanSetters: UpdateFlag[Disable[BeanSetters, Flags]]

Disable Java Beans naming convention (.setName(value)) on To.

Disable Java Beans naming convention (.setName(value)) on To.

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableCollectionFallbackMerge: UpdateFlag[Disable[CollectionFallbackMerge[_], Flags]]

Disable merging fallback collection values into the source collection value.

Disable merging fallback collection values into the source collection value.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableCustomFieldNameComparison: UpdateFlag[Disable[FieldNameComparison[_], Flags]]

Disable any custom way of comparing if source fields' names and target fields' names are matching.

Disable any custom way of comparing if source fields' names and target fields' names are matching.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableCustomSubtypeNameComparison: UpdateFlag[Disable[SubtypeNameComparison[_], Flags]]

Disable any custom way of comparing if source subtypes' names and target fields' names are matching.

Disable any custom way of comparing if source subtypes' names and target fields' names are matching.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def disableDefaultValueOfType[T]: UpdateFlag[Disable[DefaultValueOfType[T], Flags]]

Fail derivation if From type is missing field even if To has default value type for fields of T type.

Fail derivation if From type is missing field even if To has default value type for fields of T type.

This flag can be set in parallel to globally enabling default values with disableDefaultValues.

Attributes

See also
Since

1.2.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableDefaultValues: UpdateFlag[Disable[DefaultValues, Flags]]

Fail derivation if From type is missing field even if To has default value for it.

Fail derivation if From type is missing field even if To has default value for it.

This flag can be set in parallel to enabling default values for specific field type with * disableDefaultValueOfType.

Attributes

See also
Since

0.1.9

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableEitherFallbackMerge: UpdateFlag[Disable[EitherFallbackMerge[_], Flags]]

Disable merging fallback Either values into the source Either value.

Disable merging fallback Either values into the source Either value.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableIgnoreUnmatchedBeanSetters: UpdateFlag[Disable[BeanSettersIgnoreUnmatched, Flags]]

Disable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

Disable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

Attributes

See also
Since

0.8.3

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableImplicitConflictResolution: UpdateFlag[Disable[ImplicitConflictResolution[_], Flags]]

Disable any implicit conflict resolution preference that was set previously.

Disable any implicit conflict resolution preference that was set previously.

Attributes

See also
Since

0.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableImplicitConversions: UpdateFlag[Disable[ImplicitConversions, Flags]]

Disable using implicit conversions to transform one From into To.

Disable using implicit conversions to transform one From into To.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableInheritedAccessors: UpdateFlag[Disable[InheritedAccessors, Flags]]

Disable inherited accessors lookup that was previously enabled by enableInheritedAccessors

Disable inherited accessors lookup that was previously enabled by enableInheritedAccessors

Attributes

See also
Since

0.8.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableMacrosLogging: UpdateFlag[Disable[MacrosLogging, Flags]]

Disable printing the logs from the derivation process.

Disable printing the logs from the derivation process.

Attributes

See also
Since

0.8.0

Inherited from:
TransformerFlagsDsl (hidden)
def disableMethodAccessors: UpdateFlag[Disable[MethodAccessors, Flags]]

Disable method accessors lookup that was previously enabled by enableMethodAccessors

Disable method accessors lookup that was previously enabled by enableMethodAccessors

Attributes

See also
Since

0.5.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableNonAnyValWrappers: UpdateFlag[Disable[NonAnyValWrappers, Flags]]

Disable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

Disable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

Attributes

See also
Since

1.3.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableNonUnitBeanSetters: UpdateFlag[Disable[NonUnitBeanSetters, Flags]]

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableOptionDefaultsToNone: UpdateFlag[Disable[OptionDefaultsToNone, Flags]]

Disable None fallback value for optional fields in To.

Disable None fallback value for optional fields in To.

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableOptionFallbackMerge: UpdateFlag[Disable[OptionFallbackMerge[_], Flags]]

Disable merging fallback Option values into the source Option value.

Disable merging fallback Option values into the source Option value.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disablePartialUnwrapsOption: UpdateFlag[Disable[PartialUnwrapsOption, Flags]]

Disable safe Option unwrapping by PartialTransformer - each Option to non-Option` has to be handled manually.

Disable safe Option unwrapping by PartialTransformer - each Option to non-Option` has to be handled manually.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableTypeConstraintEvidence: UpdateFlag[Disable[TypeConstraintEvidence, Flags]]

Disable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

Disable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def disableUnmatchedSubtypePolicyCheck: UpdateFlag[Disable[UnmatchedSubtypePolicyCheck[_], Flags]]

Disable policy check for target subtypes that would not be used anywhere during transformation.

Disable policy check for target subtypes that would not be used anywhere during transformation.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def disableUnusedFieldPolicyCheck: UpdateFlag[Disable[UnusedFieldPolicyCheck[_], Flags]]

Disable policy check for source fields that would not be used anywhere during transformation.

Disable policy check for source fields that would not be used anywhere during transformation.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableBeanGetters: UpdateFlag[Enable[BeanGetters, Flags]]

Enable Java Beans naming convention (.getName, .isName) on From.

Enable Java Beans naming convention (.getName, .isName) on From.

By default, only Scala conversions (.name) are allowed.

Attributes

See also
Since

0.2.1

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableBeanSetters: UpdateFlag[Enable[BeanSetters, Flags]]

Enable Java Beans naming convention (.setName(value)) on To.

Enable Java Beans naming convention (.setName(value)) on To.

By default, only Scala conversions (.copy(name = value)) are allowed.

Attributes

See also
Since

0.2.1

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableCollectionFallbackMerge[S <: CollectionFallbackMergeStrategy](strategy: S): UpdateFlag[Enable[CollectionFallbackMerge[S], Flags]]

Enable merging fallback collection values into the source collection value.

Enable merging fallback collection values into the source collection value.

Value parameters

strategy

parameter specifying which strategy should be used to merge fallbacks with source value

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableCustomFieldNameComparison[C <: TransformedNamesComparison & Singleton](namesComparison: C): UpdateFlag[Enable[FieldNameComparison[C], Flags]]

Enable custom way of comparing if source fields' names and target fields' names are matching.

Enable custom way of comparing if source fields' names and target fields' names are matching.

Value parameters

namesComparison

parameter specifying how names should be compared by macro

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableCustomSubtypeNameComparison[C <: TransformedNamesComparison & Singleton](namesComparison: C): UpdateFlag[Enable[SubtypeNameComparison[C], Flags]]

Enable custom way of comparing if source subtypes' names and target fields' names are matching.

Enable custom way of comparing if source subtypes' names and target fields' names are matching.

Value parameters

namesComparison

parameter specifying how names should be compared by macro

Attributes

See also
Since

1.0.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def enableDefaultValueOfType[T]: UpdateFlag[Enable[DefaultValueOfType[T], Flags]]

Enable fallback to default case class values in To type for fields of T type.

Enable fallback to default case class values in To type for fields of T type.

By default, in such case derivation will fail. By enabling this flag, derivation will fallback to default value.

This flag can be set in parallel to globally enabling default values with enableDefaultValues.

Attributes

See also
Since

1.2.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableDefaultValues: UpdateFlag[Enable[DefaultValues, Flags]]

Enable fallback to default case class values in To type.

Enable fallback to default case class values in To type.

By default, in such case derivation will fail. By enabling this flag, derivation will fallback to default value.

This flag can be set in parallel to enabling default values for specific field type with enableDefaultValueOfType.

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableEitherFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): UpdateFlag[Enable[EitherFallbackMerge[S], Flags]]

Enable merging fallback Either values into the source Either value.

Enable merging fallback Either values into the source Either value.

Value parameters

strategy

parameter specifying which strategy should be used to merge fallbacks with source value

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableIgnoreUnmatchedBeanSetters: UpdateFlag[Enable[BeanSettersIgnoreUnmatched, Flags]]

Enable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

Enable not failing compilation on unresolved Java Beans naming convention (.setName(value)) in To.

By default, presence of setters (.setName(value)) fails compilation unless setters are enabled and matched with a source field or provided valued.

Attributes

See also
Since

0.8.3

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableImplicitConflictResolution[P <: ImplicitTransformerPreference](preference: P): UpdateFlag[Enable[ImplicitConflictResolution[P], Flags]]

Enable conflict resolution when both Transformer and PartialTransformer are available in the implicit scope.

Enable conflict resolution when both Transformer and PartialTransformer are available in the implicit scope.

Value parameters

preference

parameter specifying which implicit transformer to pick in case of conflict

Attributes

See also
Since

0.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableImplicitConversions: UpdateFlag[Enable[ImplicitConversions, Flags]]

Enable using implicit conversions to transform one From into To.

Enable using implicit conversions to transform one From into To.

By default, implicit conversions are ignored.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableInheritedAccessors: UpdateFlag[Enable[InheritedAccessors, Flags]]

Enable lookup in definitions inherited from supertype.

Enable lookup in definitions inherited from supertype.

By default, only values defined directly in the type are considered. With this flag supertype methods would not be filtered out

Attributes

See also
Since

0.8.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableMacrosLogging: UpdateFlag[Enable[MacrosLogging, Flags]]

Enable printing the logs from the derivation process.

Enable printing the logs from the derivation process.

Attributes

See also
Since

0.8.0

Inherited from:
TransformerFlagsDsl (hidden)
def enableMethodAccessors: UpdateFlag[Enable[MethodAccessors, Flags]]

Enable values to be supplied from method calls. Source method must be public and have no parameter list.

Enable values to be supplied from method calls. Source method must be public and have no parameter list.

By default, this is disabled because method calls may perform side effects (e.g. mutations)

Attributes

See also
Since

0.6.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableNonAnyValWrappers: UpdateFlag[Enable[NonAnyValWrappers, Flags]]

Enable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

Enable unpacking/wrapping with wrapper types (classes with have only 1 val, set in a constructor) even when they are not AnyVals.

By default, in such case compilation fails.

Attributes

See also
Since

1.3.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableNonUnitBeanSetters: UpdateFlag[Enable[NonUnitBeanSetters, Flags]]

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

Enable calling unary non-Unit methods with Java Beans naming convention (.setName(value)) in To.

By default, only methods returning Unit (setName(value): Unit) could be considered setters.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableOptionDefaultsToNone: UpdateFlag[Enable[OptionDefaultsToNone, Flags]]

Sets target value of optional field to None if field is missing from source type From.

Sets target value of optional field to None if field is missing from source type From.

By default, in such case compilation fails.

Attributes

See also
Since

0.2.1

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableOptionFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): UpdateFlag[Enable[OptionFallbackMerge[S], Flags]]

Enable merging fallback Option values into the source Option value.

Enable merging fallback Option values into the source Option value.

Value parameters

strategy

parameter specifying which strategy should be used to merge fallbacks with source value

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enablePartialUnwrapsOption: UpdateFlag[Enable[PartialUnwrapsOption, Flags]]

Enable safe Option unwrapping by PartialTransformer - Option is automatically unwrapped to non-Option values, None is treated as empty value errors.

Enable safe Option unwrapping by PartialTransformer - Option is automatically unwrapped to non-Option values, None is treated as empty value errors.

This is the default behavior.

Attributes

See also
Since

1.0.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableTypeConstraintEvidence: UpdateFlag[Enable[TypeConstraintEvidence, Flags]]

Enable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

Enable using scala.Predef.&lt;:&lt; or scala.Predef.=:= to prove that From is a subtype of To.

By default, such evidence is ignored.

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)
def enableUnmatchedSubtypePolicyCheck[P <: UnmatchedSubtypePolicy & Singleton](unmatchedSubtypePolicy: P): UpdateFlag[Enable[UnmatchedSubtypePolicyCheck[P], Flags]]

Enable policy check for target subtypes that would not be used anywhere during transformation.

Enable policy check for target subtypes that would not be used anywhere during transformation.

Value parameters

unmatchedSubtypePolicy

parameter specifying how unmatched target subtypes should be treated

Attributes

See also
Since

1.7.0

Inherited from:
TransformerSourceFlagsDsl (hidden)
def enableUnusedFieldPolicyCheck[P <: UnusedFieldPolicy & Singleton](unusedFieldPolicy: P): UpdateFlag[Enable[UnusedFieldPolicyCheck[P], Flags]]

Enable policy check for source fields that would not be used anywhere during transformation.

Enable policy check for source fields that would not be used anywhere during transformation.

Value parameters

unusedFieldPolicy

parameter specifying how unused source fields should be treated

Attributes

See also
Since

1.7.0

Inherited from:
TransformerTargetFlagsDsl (hidden)