c

io.scalaland.chimney.dsl

PartialTransformerDefinition

final class PartialTransformerDefinition[From, To, Overrides <: TransformerOverrides, Flags <: TransformerFlags] extends TransformerFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags] with TransformerDefinitionCommons[[Overrides1]PartialTransformerDefinition[From, To, Overrides1, Flags]] with WithRuntimeDataStore

Allows customization of io.scalaland.chimney.PartialTransformer derivation.

From

type of input value

To

type of output value

Overrides

type-level encoded config

Flags

type-level encoded flags

Since

0.7.0

Linear Supertypes
WithRuntimeDataStore, TransformerDefinitionCommons[[Overrides1]PartialTransformerDefinition[From, To, Overrides1, Flags]], TransformerFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags], TransformerTargetFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags], TransformerSourceFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PartialTransformerDefinition
  2. WithRuntimeDataStore
  3. TransformerDefinitionCommons
  4. TransformerFlagsDsl
  5. TransformerTargetFlagsDsl
  6. TransformerSourceFlagsDsl
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new PartialTransformerDefinition(runtimeData: RuntimeDataStore)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. macro def buildTransformer[ImplicitScopeFlags <: TransformerFlags](implicit tc: TransformerConfiguration[ImplicitScopeFlags]): PartialTransformer[From, To]

    Build Partial Transformer using current configuration.

    Build Partial Transformer using current configuration.

    It runs macro that tries to derive instance of PartialTransformer[From, To]. When transformation can't be derived, it results with compilation error.

    returns

    io.scalaland.chimney.PartialTransformer type class instance

    Since

    0.7.0

  6. def castedSource: Any
    Attributes
    protected
    Definition Classes
    TransformerSourceFlagsDsl
  7. def castedTarget: Any
    Attributes
    protected
    Definition Classes
    TransformerTargetFlagsDsl
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def disableBeanGetters: PartialTransformerDefinition[From, To, Overrides, Disable[BeanGetters, Flags]]

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

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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#reading-from-bean-getters for more details

  10. def disableBeanSetters: PartialTransformerDefinition[From, To, Overrides, Disable[BeanSetters, Flags]]

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

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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#writing-to-bean-setters for more details

  11. def disableCollectionFallbackMerge: PartialTransformerDefinition[From, To, Overrides, Disable[CollectionFallbackMerge[_], Flags]]

    Disable merging fallback collection values into the source collection value.

    Disable merging fallback collection values into the source collection value.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-collection-with-collection-into-collection for more details

  12. def disableCustomFieldNameComparison: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#customizing-field-name-matching for more details

  13. def disableCustomSubtypeNameComparison: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerSourceFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#customizing-subtype-name-matching for more details

  14. def disableDefaultValueOfType[T]: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.2.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details

  15. def disableDefaultValues: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.1.9

    See also

    https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details

  16. def disableEitherFallbackMerge: PartialTransformerDefinition[From, To, Overrides, Disable[EitherFallbackMerge[_], Flags]]

    Disable merging fallback Either values into the source Either value.

    Disable merging fallback Either values into the source Either value.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-either-with-either-into-either for more details

  17. def disableIgnoreUnmatchedBeanSetters: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.8.3

    See also

    https://chimney.readthedocs.io/supported-transformations/#ignoring-unmatched-bean-setters for more details

  18. def disableImplicitConflictResolution: PartialTransformerDefinition[From, To, Overrides, Disable[ImplicitConflictResolution[_], Flags]]

    Disable any implicit conflict resolution preference that was set previously.

    Disable any implicit conflict resolution preference that was set previously.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#resolving-priority-of-implicit-total-vs-partial-transformers for more details

  19. def disableImplicitConversions: PartialTransformerDefinition[From, To, Overrides, Disable[ImplicitConversions, Flags]]

    Disable using implicit conversions to transform one From into To.

    Disable using implicit conversions to transform one From into To.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#implicit-conversions for more details

  20. def disableInheritedAccessors: PartialTransformerDefinition[From, To, Overrides, Disable[InheritedAccessors, Flags]]

    Disable inherited accessors lookup that was previously enabled by enableInheritedAccessors

    Disable inherited accessors lookup that was previously enabled by enableInheritedAccessors

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.8.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#reading-from-inherited-valuesmethods for more details

  21. def disableMacrosLogging: PartialTransformerDefinition[From, To, Overrides, Disable[MacrosLogging, Flags]]

    Disable printing the logs from the derivation process.

    Disable printing the logs from the derivation process.

    Definition Classes
    TransformerFlagsDsl
    Since

    0.8.0

    See also

    https://chimney.readthedocs.io/troubleshooting/#debugging-macros for more details

  22. def disableMethodAccessors: PartialTransformerDefinition[From, To, Overrides, Disable[MethodAccessors, Flags]]

    Disable method accessors lookup that was previously enabled by enableMethodAccessors

    Disable method accessors lookup that was previously enabled by enableMethodAccessors

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.5.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#reading-from-methods for more details

  23. def disableNonAnyValWrappers: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.3.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#frominto-a-wrapper-type for more details

  24. def disableNonUnitBeanSetters: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#writing-to-non-unit-bean-setters for more details

  25. def disableOptionDefaultsToNone: PartialTransformerDefinition[From, To, Overrides, Disable[OptionDefaultsToNone, Flags]]

    Disable None fallback value for optional fields in To.

    Disable None fallback value for optional fields in To.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-none-as-the-constructors-argument for more details

  26. def disableOptionFallbackMerge: PartialTransformerDefinition[From, To, Overrides, Disable[OptionFallbackMerge[_], Flags]]

    Disable merging fallback Option values into the source Option value.

    Disable merging fallback Option values into the source Option value.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-option-with-option-into-option for more details

  27. def disablePartialUnwrapsOption: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#controlling-automatic-option-unwrapping for more details

  28. def disableTypeConstraintEvidence: PartialTransformerDefinition[From, To, Overrides, Disable[TypeConstraintEvidence, Flags]]

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

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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#type-evidence-based-conversions for more details

  29. def disableUnmatchedSubtypePolicyCheck: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerSourceFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details

  30. def disableUnusedFieldPolicyCheck: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details

  31. def enableBeanGetters: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.2.1

    See also

    https://chimney.readthedocs.io/supported-transformations/#reading-from-bean-getters for more details

  32. def enableBeanSetters: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.2.1

    See also

    https://chimney.readthedocs.io/supported-transformations/#writing-to-bean-setters for more details

  33. def enableCollectionFallbackMerge[S <: CollectionFallbackMergeStrategy](strategy: S): PartialTransformerDefinition[From, To, Overrides, Enable[CollectionFallbackMerge[S], Flags]]

    Enable merging fallback collection values into the source collection value.

    Enable merging fallback collection values into the source collection value.

    strategy

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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-collection-with-collection-into-collection for more details

  34. def enableCustomFieldNameComparison[C <: TransformedNamesComparison with Singleton](namesComparison: C): PartialTransformerDefinition[From, To, Overrides, 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.

    namesComparison

    parameter specifying how names should be compared by macro

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#customizing-field-name-matching for more details

  35. def enableCustomSubtypeNameComparison[C <: TransformedNamesComparison with Singleton](namesComparison: C): PartialTransformerDefinition[From, To, Overrides, 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.

    namesComparison

    parameter specifying how names should be compared by macro

    Definition Classes
    TransformerSourceFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#customizing-subtype-name-matching for more details

  36. def enableDefaultValueOfType[T]: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.2.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details

  37. def enableDefaultValues: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-the-constructors-default-values for more details

  38. def enableEitherFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): PartialTransformerDefinition[From, To, Overrides, Enable[EitherFallbackMerge[S], Flags]]

    Enable merging fallback Either values into the source Either value.

    Enable merging fallback Either values into the source Either value.

    strategy

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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-either-with-either-into-either for more details

  39. def enableIgnoreUnmatchedBeanSetters: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.8.3

    See also

    https://chimney.readthedocs.io/supported-transformations/#ignoring-unmatched-bean-setters for more details

  40. def enableImplicitConflictResolution[P <: ImplicitTransformerPreference](preference: P): PartialTransformerDefinition[From, To, Overrides, 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.

    preference

    parameter specifying which implicit transformer to pick in case of conflict

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#resolving-priority-of-implicit-total-vs-partial-transformers for more details

  41. def enableImplicitConversions: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#implicit-conversions for more details

  42. def enableInheritedAccessors: PartialTransformerDefinition[From, To, Overrides, 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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.8.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#reading-from-inherited-valuesmethods for more details

  43. def enableMacrosLogging: PartialTransformerDefinition[From, To, Overrides, Enable[MacrosLogging, Flags]]

    Enable printing the logs from the derivation process.

    Enable printing the logs from the derivation process.

    Definition Classes
    TransformerFlagsDsl
    Since

    0.8.0

    See also

    https://chimney.readthedocs.io/troubleshooting/#debugging-macros for more details

  44. def enableMethodAccessors: PartialTransformerDefinition[From, To, Overrides, Enable[MethodAccessors, Flags]]

    Enable values to be supplied from method calls.

    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)

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#reading-from-methods for more details

  45. def enableNonAnyValWrappers: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.3.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#frominto-a-wrapper-type for more details

  46. def enableNonUnitBeanSetters: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#writing-to-non-unit-bean-setters for more details

  47. def enableOptionDefaultsToNone: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    0.2.1

    See also

    https://chimney.readthedocs.io/supported-transformations/#allowing-fallback-to-none-as-the-constructors-argument for more details

  48. def enableOptionFallbackMerge[S <: OptionFallbackMergeStrategy](strategy: S): PartialTransformerDefinition[From, To, Overrides, Enable[OptionFallbackMerge[S], Flags]]

    Enable merging fallback Option values into the source Option value.

    Enable merging fallback Option values into the source Option value.

    strategy

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

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-option-with-option-into-option for more details

  49. def enablePartialUnwrapsOption: PartialTransformerDefinition[From, To, Overrides, 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.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#controlling-automatic-option-unwrapping for more details

  50. def enableTypeConstraintEvidence: PartialTransformerDefinition[From, To, Overrides, Enable[TypeConstraintEvidence, Flags]]

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

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

    By default, such evidence is ignored.

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#type-evidence-based-conversions for more details

  51. def enableUnmatchedSubtypePolicyCheck[P <: UnmatchedSubtypePolicy with Singleton](unmatchedSubtypePolicy: P): PartialTransformerDefinition[From, To, Overrides, 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.

    unmatchedSubtypePolicy

    parameter specifying how unmatched target subtypes should be treated

    Definition Classes
    TransformerSourceFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details

  52. def enableUnusedFieldPolicyCheck[P <: UnusedFieldPolicy with Singleton](unusedFieldPolicy: P): PartialTransformerDefinition[From, To, Overrides, 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.

    unusedFieldPolicy

    parameter specifying how unused source fields should be treated

    Definition Classes
    TransformerTargetFlagsDsl
    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details

  53. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  55. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  56. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  57. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  58. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  59. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  60. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  61. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  62. val runtimeData: RuntimeDataStore

    Runtime storage for values and functions that Transformer definition is customized with.

    Runtime storage for values and functions that Transformer definition is customized with.

    Definition Classes
    PartialTransformerDefinition → TransformerDefinitionCommons
  63. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  68. macro def withConstructor[Ctor](f: Ctor)(implicit ev: Of[Ctor, To]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f instead of the primary constructor to construct the To value.

    Use f instead of the primary constructor to construct the To value.

    Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

    Values for each parameter can be provided the same way as if they were normal constructor's arguments.

    Ctor

    type of the Eta-expanded method/lambda which should return To

    f

    method name or lambda which constructs To

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.8.4

    See also

    https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details

  69. macro def withConstructorEither[Ctor](f: Ctor)(implicit ev: Of[Ctor, Either[String, To]]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f instead of the primary constructor to parse into Either[String, To] value.

    Use f instead of the primary constructor to parse into Either[String, To] value.

    Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

    Values for each parameter can be provided the same way as if they were normal constructor's arguments.

    Ctor

    type of the Eta-expanded method/lambda which should return Either[String, To]

    f

    method name or lambda which constructs Either[String, To]

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details

  70. macro def withConstructorEitherTo[T, Ctor](selector: (To) => T)(f: Ctor)(implicit ev: Of[Ctor, Either[String, T]]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f instead of the primary constructor to parse into the Either value extracted from To using the selector.

    Use f instead of the primary constructor to parse into the Either value extracted from To using the selector.

    Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

    Values for each parameter can be provided the same way as if they were normal constructor's arguments.

    T

    type of the value which would be constructed with a custom constructor

    Ctor

    type of the Eta-expanded method/lambda which should return Either[String, T]

    selector

    target field in To, defined like _.name

    f

    method name or lambda which constructs Either[String, T]

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details

  71. macro def withConstructorPartial[Ctor](f: Ctor)(implicit ev: Of[Ctor, Result[To]]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f instead of the primary constructor to parse into partial.Result[To] value.

    Use f instead of the primary constructor to parse into partial.Result[To] value.

    Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

    Values for each parameter can be provided the same way as if they were normal constructor's arguments.

    Ctor

    type of the Eta-expanded method/lambda which should return partial.Result[To]

    f

    method name or lambda which constructs partial.Result[To]

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.8.4

    See also

    https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details

  72. macro def withConstructorPartialTo[T, Ctor](selector: (To) => T)(f: Ctor)(implicit ev: Of[Ctor, Result[T]]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f instead of the primary constructor to parse into the value extracted from To using the selector.

    Use f instead of the primary constructor to parse into the value extracted from To using the selector.

    Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

    Values for each parameter can be provided the same way as if they were normal constructor's arguments.

    T

    type of the value which would be constructed with a custom constructor

    Ctor

    type of the Eta-expanded method/lambda which should return partial.Result[T]

    selector

    target field in To, defined like _.name

    f

    method name or lambda which constructs partial.Result[T]

    returns

    io.scalaland.chimney.dsl.PartialTransformerInto

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details

  73. macro def withConstructorTo[T, Ctor](selector: (To) => T)(f: Ctor)(implicit ev: Of[Ctor, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f instead of the primary constructor to construct the value extracted from To using the selector.

    Use f instead of the primary constructor to construct the value extracted from To using the selector.

    Macro will read the names of Eta-expanded method's/lambda's parameters and try to match them with From getters.

    Values for each parameter can be provided the same way as if they were normal constructor's arguments.

    T

    type of the value which would be constructed with a custom constructor

    Ctor

    type of the Eta-expanded method/lambda which should return T

    selector

    target field in To, defined like _.name

    f

    method name or lambda which constructs To

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#types-with-manually-provided-constructors for more details

  74. macro def withEnumCaseHandled[Subtype](f: (Subtype) => To): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Alias to withSealedSubtypeHandled.

    Since

    1.0.0

  75. macro def withEnumCaseHandledPartial[Subtype](f: (Subtype) => Result[To]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Alias to withSealedSubtypeHandledPartial.

    Since

    1.0.0

  76. macro def withEnumCaseRenamed[FromSubtype, ToSubtype]: PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Alias to withSealedSubtypeRenamed.

    Since

    1.2.0

  77. macro def withEnumCaseUnmatched[T](selectorTo: (To) => T): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Alias to withSealedSubtypeUnmatched.

    Since

    1.7.0

  78. macro def withFallback[FromFallback](fallback: FromFallback): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    To use fallback when the source of type From is missing fields.

    To use fallback when the source of type From is missing fields.

    Fallbacks can be stacked - then they will be tried in the order in which they were added.

    FromFallback

    type of the fallback value which would be checked for fields when the From value would be missing

    fallback

    fallback value which would be checked for fields when the From value would be missing

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-multiple-input-sources-into-a-single-target-value for more details

  79. macro def withFallbackFrom[T, FromFallback](selectorFrom: (From) => T)(fallback: FromFallback): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    To use fallback when the source of type T, extracted with selectorFrom, is missing fields.

    To use fallback when the source of type T, extracted with selectorFrom, is missing fields.

    Fallbacks can be stacked - then they will be tried in the order in which they were added.

    T

    type of the source value that fallback is provided for

    FromFallback

    type of the fallback value which would be checked for fields when the From value would be missing

    selectorFrom

    path to the source value the fallback will be provided for

    fallback

    fallback value which would be checked for fields when the From value would be missing

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#merging-multiple-input-sources-into-a-single-target-value for more details

  80. macro def withFieldComputed[T, U](selector: (To) => T, f: (From) => U)(implicit ev: <:<[U, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use the function f to compute a value of the field picked using the selector.

    Use the function f to compute a value of the field picked using the selector.

    By default, if From is missing a field and it's not provided with some selector, the compilation fails.

    T

    type of target field

    U

    type of computed value

    selector

    target field in To, defined like _.name

    f

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details

  81. macro def withFieldComputedFrom[S, T, U](selectorFrom: (From) => S)(selectorTo: (To) => T, f: (S) => U)(implicit ev: <:<[U, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use the function f to compute a value of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

    Use the function f to compute a value of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

    By default, if From is missing a field and it's not provided with some selectorTo, the compilation fails.

    S

    * type of source field

    T

    type of target field

    U

    type of computed value

    selectorFrom

    source field in From, defined like _.name

    selectorTo

    target field in To, defined like _.name

    f

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details

  82. macro def withFieldComputedPartial[T, U](selector: (To) => T, f: (From) => Result[U])(implicit ev: <:<[U, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use the function f to compute a partial result for the field picked using the selector.

    Use the function f to compute a partial result for the field picked using the selector.

    By default, if From is missing a field and it's not provided with some selector, the compilation fails.

    T

    type of target field

    U

    type of computed value

    selector

    target field in To, defined like _.name

    f

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details

  83. macro def withFieldComputedPartialFrom[S, T, U](selectorFrom: (From) => S)(selectorTo: (To) => T, f: (S) => Result[U])(implicit ev: <:<[U, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use the function f to compute a partial result of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

    Use the function f to compute a partial result of the field picked using the selectorTo from a value extracted with selectorFrom as an input.

    By default, if From is missing a field and it's not provided with some selector, the compilation fails.

    S

    * type of source field

    T

    type of target field

    U

    type of computed value

    selectorFrom

    source field in From, defined like _.name

    selectorTo

    target field in To, defined like _.name

    f

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-computed-value for more details

  84. macro def withFieldConst[T, U](selector: (To) => T, value: U)(implicit ev: <:<[U, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use provided value for field picked using selector.

    Use provided value for field picked using selector.

    By default, if From is missing field picked by selector, compilation fails.

    T

    type of target field

    U

    type of provided value

    selector

    target field in To, defined like _.name

    value

    constant value to use for the target field

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-a-provided-value for more details

  85. macro def withFieldConstPartial[T, U](selector: (To) => T, value: Result[U])(implicit ev: <:<[U, T]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use provided partial result value for field picked using selector.

    Use provided partial result value for field picked using selector.

    By default, if From is missing field picked by selector, compilation fails.

    T

    type of target field

    U

    type of computed value

    selector

    target field in To, defined like _.name

    value

    constant value to use for the target field

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-a-provided-value for more details

  86. macro def withFieldRenamed[T, U](selectorFrom: (From) => T, selectorTo: (To) => U): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use the selectorFrom field in From to obtain the value of the selectorTo field in To.

    Use the selectorFrom field in From to obtain the value of the selectorTo field in To.

    By default, if From is missing a field and it's not provided with some selectorTo, the compilation fails.

    T

    type of source field

    U

    type of target field

    selectorFrom

    source field in From, defined like _.originalName

    selectorTo

    target field in To, defined like _.newName

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#wiring-the-constructors-parameter-to-its-source-field for more details

  87. macro def withFieldUnused[T](selectorFrom: (From) => T): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Mark field as expected to be unused when it would fail UnusedFieldPolicy by default.

    Mark field as expected to be unused when it would fail UnusedFieldPolicy by default.

    T

    type of source field

    selectorFrom

    source field in From, defined like _.originalName

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details

  88. macro def withSealedSubtypeHandled[Subtype](f: (Subtype) => To): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f to calculate the unmatched subtype when mapping one sealed/enum into another.

    Use f to calculate the unmatched subtype when mapping one sealed/enum into another.

    By default, if mapping one coproduct in From into another coproduct in To derivation expects that coproducts to have matching names of its components, and for every component in To field's type there is matching component in From type. If some component is missing it fails compilation unless provided replacement with this operation.

    For convenience/readability withEnumCaseHandled alias can be used (e.g. for Scala 3 enums or Java enums).

    It differs from withFieldComputed(_.matching[Subtype], src => ...), since withSealedSubtypeHandled matches on a From subtype, while .matching[Subtype] matches on a To value's piece.

    Subtype

    type of sealed/enum instance

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.0.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#handling-a-specific-sealed-subtype-with-a-computed-value for more details

  89. macro def withSealedSubtypeHandledPartial[Subtype](f: (Subtype) => Result[To]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use f to calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.

    Use f to calculate the unmatched subtype's partial.Result when mapping one sealed/enum into another.

    By default, if mapping one coproduct in From into another coproduct in To derivation expects that coproducts to have matching names of its components, and for every component in To field's type there is matching component in From type. If some component is missing it fails compilation unless provided replacement with this operation.

    For convenience/readability withEnumCaseHandledPartial alias can be used (e.g. for Scala 3 enums or Java enums).

    It differs from withFieldComputedPartial(_.matching[Subtype], src => ...), since withSealedSubtypeHandled matches on a From subtype, while .matching[Subtype] matches on a To value's piece.

    Subtype

    type of sealed/enum instance

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    0.7.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#handling-a-specific-sealed-subtype-with-a-computed-value for more details

  90. macro def withSealedSubtypeRenamed[FromSubtype, ToSubtype]: PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Use the FromSubtype in From as a source for the ToSubtype in To.

  91. macro def withSealedSubtypeUnmatched[T](selectorTo: (To) => T): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Mark subtype as expected to be unmatched when it would fail UnmatchedSubtypePolicy by default.

    Mark subtype as expected to be unmatched when it would fail UnmatchedSubtypePolicy by default.

    T

    type of subtype

    selectorTo

    target subtype in To, defined like _.matching[Subtype]

    returns

    io.scalaland.chimney.dsl.PartialTransformerDefinition

    Since

    1.7.0

    See also

    https://chimney.readthedocs.io/cookbook/#checking-for-unused-source-fieldsunmatched-target-subtypes for more details

  92. macro def withSourceFlag[T](selectorFrom: (From) => T): OfPartialTransformerDefinition[From, To, Overrides, Flags, _ <: Path]

    Define a flag only on some source value using the selectorFrom, rather than globally.

    Define a flag only on some source value using the selectorFrom, rather than globally.

    T

    type of the source field

    selectorFrom

    source field in From, defined like _.name

    returns

    io.scalaland.chimney.dsl.TransformerSourceFlagsDsl.OfPartialTransformerDefinition

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/cookbook/#constraining-flags-to-a-specific-fieldsubtype for more details

  93. macro def withTargetFlag[T](selectorTo: (To) => T): OfPartialTransformerDefinition[From, To, Overrides, Flags, _ <: Path]

    Define a flag only on some source value using the selectorTo, rather than globally.

    Define a flag only on some source value using the selectorTo, rather than globally.

    T

    type of the target field

    selectorTo

    target field in To, defined like _.name

    returns

    io.scalaland.chimney.dsl.TransformerTargetFlagsDsl.OfPartialTransformerDefinition

    Since

    1.6.0

    See also

    https://chimney.readthedocs.io/cookbook/#constraining-flags-to-a-specific-fieldsubtype for more details

Deprecated Value Members

  1. macro def withCoproductInstance[Subtype](f: (Subtype) => To): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Renamed to withSealedSubtypeHandled.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) Use .withSealedSubtypeHandled or .withEnumCaseHandled for more clarity

    Since

    0.7.0

  2. macro def withCoproductInstancePartial[Subtype](f: (Subtype) => Result[To]): PartialTransformerDefinition[From, To, _ <: TransformerOverrides, Flags]

    Renamed to withSealedSubtypeHandledPartial.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) Use .withSealedSubtypeHandledPartial or .withEnumCaseHandledPartial for more clarity

    Since

    0.7.0

Inherited from WithRuntimeDataStore

Inherited from TransformerDefinitionCommons[[Overrides1]PartialTransformerDefinition[From, To, Overrides1, Flags]]

Inherited from TransformerFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags]

Inherited from TransformerTargetFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags]

Inherited from TransformerSourceFlagsDsl[[Flags1]PartialTransformerDefinition[From, To, Overrides, Flags1], Flags]

Inherited from AnyRef

Inherited from Any

Ungrouped