c

io.scalaland.chimney.dsl

IsoDefinition

final class IsoDefinition[First, Second, FirstOverrides <: TransformerOverrides, SecondOverrides <: TransformerOverrides, Flags <: TransformerFlags] extends TransformerFlagsDsl[[Flags1]IsoDefinition[First, Second, FirstOverrides, SecondOverrides, Flags1], Flags]

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

First

input type of the first conversion, output type of the second conversion

Second

output type of the first conversion, input type of the second conversion

FirstOverrides

type-level encoded config

SecondOverrides

type-level encoded config

Flags

type-level encoded flags

Since

1.2.0

Linear Supertypes
TransformerFlagsDsl[[Flags1]IsoDefinition[First, Second, FirstOverrides, SecondOverrides, Flags1], Flags], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IsoDefinition
  2. TransformerFlagsDsl
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IsoDefinition(first: TransformerDefinition[First, Second, FirstOverrides, Flags], second: TransformerDefinition[Second, First, SecondOverrides, Flags])

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 buildIso[ImplicitScopeFlags <: TransformerFlags](implicit tc: TransformerConfiguration[ImplicitScopeFlags]): Iso[First, Second]

    Build Iso using current configuration.

    Build Iso using current configuration.

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

    returns

    io.scalaland.chimney.Iso type class instance

    Since

    1.2.0

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def disableBeanGetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, Disable[BeanGetters, Flags]]

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

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

    Definition Classes
    TransformerFlagsDsl
    Since

    0.6.0

    See also

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

  8. def disableBeanSetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, Disable[BeanSetters, Flags]]

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

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

    Definition Classes
    TransformerFlagsDsl
    Since

    0.6.0

    See also

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

  9. def disableCustomFieldNameComparison: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  10. def disableCustomSubtypeNameComparison: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  11. def disableDefaultValueOfType[T]: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.2.0

    See also

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

  12. def disableDefaultValues: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.1.9

    See also

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

  13. def disableIgnoreUnmatchedBeanSetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.8.3

    See also

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

  14. def disableImplicitConflictResolution: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.7.0

    See also

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

  15. def disableInheritedAccessors: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.8.0

    See also

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

  16. def disableMacrosLogging: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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

  17. def disableMethodAccessors: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.5.0

    See also

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

  18. def disableNonAnyValWrappers: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.3.0

    See also

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

  19. def disableNonUnitBeanSetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  20. def disableOptionDefaultsToNone: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, Disable[OptionDefaultsToNone, Flags]]

    Disable None fallback value for optional fields in To.

    Disable None fallback value for optional fields in To.

    Definition Classes
    TransformerFlagsDsl
    Since

    0.6.0

    See also

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

  21. def disablePartialUnwrapsOption: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  22. def enableBeanGetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.2.1

    See also

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

  23. def enableBeanSetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.2.1

    See also

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

  24. def enableCustomFieldNameComparison[C <: TransformedNamesComparison with Singleton](namesComparison: C): IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  25. def enableCustomSubtypeNameComparison[C <: TransformedNamesComparison with Singleton](namesComparison: C): IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  26. def enableDefaultValueOfType[T]: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.2.0

    See also

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

  27. def enableDefaultValues: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.6.0

    See also

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

  28. def enableIgnoreUnmatchedBeanSetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.8.3

    See also

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

  29. def enableImplicitConflictResolution[P <: ImplicitTransformerPreference](preference: P): IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.7.0

    See also

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

  30. def enableInheritedAccessors: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.8.0

    See also

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

  31. def enableMacrosLogging: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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

  32. def enableMethodAccessors: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.6.0

    See also

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

  33. def enableNonAnyValWrappers: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.3.0

    See also

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

  34. def enableNonUnitBeanSetters: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  35. def enableOptionDefaultsToNone: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    0.2.1

    See also

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

  36. def enablePartialUnwrapsOption: IsoDefinition[First, Second, FirstOverrides, SecondOverrides, 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
    TransformerFlagsDsl
    Since

    1.0.0

    See also

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

  37. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  38. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  39. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. val first: TransformerDefinition[First, Second, FirstOverrides, Flags]
  41. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  42. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  47. val second: TransformerDefinition[Second, First, SecondOverrides, Flags]
  48. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  53. macro def withEnumCaseRenamed[FirstSubtype, SecondSubtype]: IsoDefinition[First, Second, _ <: TransformerOverrides, _ <: TransformerOverrides, Flags]

    Alias to withSealedSubtypeRenamed.

    Since

    1.2.0

  54. macro def withFieldRenamed[T, U](selectorFirst: (First) ⇒ T, selectorSecond: (Second) ⇒ U): IsoDefinition[First, Second, _ <: TransformerOverrides, _ <: TransformerOverrides, Flags]

    Use selectorFirst field in First to obtain the value of selectorSecond field in Second.

    Use selectorFirst field in First to obtain the value of selectorSecond field in Second.

    By default if First is missing field picked by selectorSecond (or reverse) the compilation fails.

    T

    type of the first field

    U

    type of the second field

    selectorFirst

    source field in First, defined like _.originalName

    selectorSecond

    target field in Second, defined like _.newName

    returns

    io.scalaland.chimney.dsl.IsoDefinition

    Since

    1.2.0

    See also

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

  55. macro def withSealedSubtypeRenamed[FirstSubtype, SecondSubtype]: IsoDefinition[First, Second, _ <: TransformerOverrides, _ <: TransformerOverrides, Flags]

    Use FirstSubtype in First as a source for SecondSubtype in Second.

    Use FirstSubtype in First as a source for SecondSubtype in Second.

    FirstSubtype

    type of sealed/enum instance

    SecondSubtype

    type of sealed/enum instance

    returns

    io.scalaland.chimney.dsl.IsoDefinition

    Since

    1.2.0

    See also

    https://chimney.readthedocs.io/supported-transformations/#handling-a-specific-sealed-subtype-by-a-specific-target-subtype for more details

Inherited from TransformerFlagsDsl[[Flags1]IsoDefinition[First, Second, FirstOverrides, SecondOverrides, Flags1], Flags]

Inherited from AnyRef

Inherited from Any

Ungrouped