Packages

c

io.scalaland.chimney.dsl

TransformerFDefinition

final class TransformerFDefinition[F[+_], From, To, C <: TransformerCfg, Flags <: TransformerFlags] extends FlagsDsl[[F1]TransformerFDefinition[F, From, To, C, F1], Flags]

Allows customization of io.scalaland.chimney.TransformerF derivation

F

wrapper type constructor

From

type of input value

To

type of output value

C

type-level encoded config

Linear Supertypes
FlagsDsl[[F1]TransformerFDefinition[F, From, To, C, F1], Flags], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TransformerFDefinition
  2. FlagsDsl
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TransformerFDefinition(overrides: Map[String, Any], instances: Map[(String, String), Any])

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. def __addInstance(from: String, to: String, value: Any): TransformerFDefinition[F, From, To, C, Flags]

    Used internally by macro.

    Used internally by macro. Please don't use in your code.

  5. def __addOverride(key: String, value: Any): TransformerFDefinition[F, From, To, C, Flags]

    Used internally by macro.

    Used internally by macro. Please don't use in your code.

  6. def __refineConfig[C1 <: TransformerCfg]: TransformerFDefinition[F, From, To, C1, Flags]

    Used internally by macro.

    Used internally by macro. Please don't use in your code.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. macro def buildTransformer[ScopeFlags <: TransformerFlags](implicit tfs: TransformerFSupport[F], tc: TransformerConfiguration[ScopeFlags]): TransformerF[F, From, To]

    Build TransformerF using current configuration.

    Build TransformerF using current configuration.

    It runs macro that tries to derive instance of TransformerF[F, From, To].

    It requires io.scalaland.chimney.TransformerFSupport instance for F to be available in implicit scope of invocation of this method.

    When transformation can't be derived, it results with compilation error.

    returns

    io.scalaland.chimney.TransformerF type class instance

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. def disableBeanGetters: TransformerFDefinition[F, From, To, C, Disable[BeanGetters, Flags]]

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

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

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/java-beans.html#reading-from-java-beans for more details

  11. def disableBeanSetters: TransformerFDefinition[F, From, To, C, Disable[BeanSetters, Flags]]

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

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

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/java-beans.html#writing-to-java-beans for more details

  12. def disableDefaultValues: TransformerFDefinition[F, From, To, C, 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.

    By default in such case derivation will fallback to default values.

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/default-values.html#disabling-default-values-in-generated-transformer for more details

  13. def disableMethodAccessors: TransformerFDefinition[F, From, To, C, 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
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#using-method-accessors for more details

  14. def disableOptionDefaultsToNone: TransformerFDefinition[F, From, To, C, Disable[OptionDefaultsToNone, Flags]]

    Disable None fallback value for optional fields in To.

    Disable None fallback value for optional fields in To.

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/default-values.html#default-values-for-option-fields for more details

  15. def disableUnsafeOption: TransformerFDefinition[F, From, To, C, Disable[UnsafeOption, Flags]]

    Disable unsafe value extraction from optional fields in From type.

    Disable unsafe value extraction from optional fields in From type.

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/unsafe-options.html for more details

  16. def enableBeanGetters: TransformerFDefinition[F, From, To, C, 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
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/java-beans.html#reading-from-java-beans for more details

  17. def enableBeanSetters: TransformerFDefinition[F, From, To, C, 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
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/java-beans.html#writing-to-java-beans for more details

  18. def enableDefaultValues: TransformerFDefinition[F, From, To, C, Enable[DefaultValues, Flags]]

    Enable fallback to default case class values in To type.

    Enable fallback to default case class values in To type.

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/default-values.html#disabling-default-values-in-generated-transformer for more details

  19. def enableMethodAccessors: TransformerFDefinition[F, From, To, C, 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
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#using-method-accessors for more details

  20. def enableOptionDefaultsToNone: TransformerFDefinition[F, From, To, C, 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
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/default-values.html#default-values-for-option-fields for more details

  21. def enableUnsafeOption: TransformerFDefinition[F, From, To, C, Enable[UnsafeOption, Flags]]

    Enable unsafe call to .get when source type From contains field of type Option[A], but target type To defines this fields as A.

    Enable unsafe call to .get when source type From contains field of type Option[A], but target type To defines this fields as A.

    It's unsafe as code generated this way may throw at runtime.

    By default in such case compilation fails.

    Definition Classes
    FlagsDsl
    See also

    https://scalalandio.github.io/chimney/transformers/unsafe-options.html for more details

  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. val instances: Map[(String, String), Any]
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. val overrides: Map[String, Any]
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. macro def withCoproductInstance[Inst <: From](f: (Inst) => To): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

    Use f to calculate the (missing) coproduct instance when mapping one coproduct into another.

    Use f to calculate the (missing) coproduct instance when mapping one coproduct 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.

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#transforming-coproducts for more details

  38. macro def withCoproductInstanceF[Inst](f: (Inst) => F[To]): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

    Use f to calculate the (missing) wrapped coproduct instance when mapping one coproduct into another

    Use f to calculate the (missing) wrapped coproduct instance when mapping one coproduct 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.

    f

    function to calculate values of components that cannot be mapped automatically

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#transforming-coproducts for more details

  39. macro def withFieldComputed[T, U](selector: (To) => T, map: (From) => U): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

    Use map provided here to compute value of field picked using selector.

    Use map provided here to compute value of field picked using selector.

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

    selector

    target field in To, defined like _.name

    map

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  40. macro def withFieldComputedF[T, U](selector: (To) => T, map: (From) => F[U]): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

    Use map provided here to compute wrapped value of field picked using selector.

    Use map provided here to compute wrapped value of field picked using selector.

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

    selector

    target field in To, defined like _.name

    map

    function used to compute value of the target field

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  41. macro def withFieldConst[T, U](selector: (To) => T, value: U): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

    Use value provided here for field picked using selector.

    Use value provided here for field picked using selector.

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

    selector

    target field in To, defined like _.name

    value

    constant value to use for the target field

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  42. macro def withFieldConstF[T, U](selector: (To) => T, value: F[U]): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

    Use wrapped value provided here for field picked using selector.

    Use wrapped value provided here for field picked using selector.

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

    selector

    target field in To, defined like _.name

    value

    constant value to use for the target field

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#providing-missing-values for more details

  43. macro def withFieldRenamed[T, U](selectorFrom: (From) => T, selectorTo: (To) => U): TransformerFDefinition[F, From, To, _ <: TransformerCfg, Flags]

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

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

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

    selectorFrom

    source field in From, defined like _.originalName

    selectorTo

    target field in To, defined like _.newName

    returns

    io.scalaland.chimney.dsl.TransformerFDefinition

    See also

    https://scalalandio.github.io/chimney/transformers/customizing-transformers.html#fields-renaming for more details

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from FlagsDsl[[F1]TransformerFDefinition[F, From, To, C, F1], Flags]

Inherited from AnyRef

Inherited from Any

Ungrouped