object to transform
transformer definition
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.
https://scalalandio.github.io/chimney/#Defaultoptionvalues for more details
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.
https://scalalandio.github.io/chimney/#ReadingfromJavabeans for more details
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.
https://scalalandio.github.io/chimney/#WritingtoJavabeans for more details
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.
https://scalalandio.github.io/chimney/#Defaultoptionvalues for more details
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.
https://scalalandio.github.io/chimney/#Unsafeoption for more details
object to transform
transformer definition
Apply configured transformation in-place
Apply configured transformation in-place
transformed value
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 will 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 will fail.
function to calculate values of components that cannot be mapped automatically
https://scalalandio.github.io/chimney/#Coproductssupport for more details
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.
target field in To
, defined like _.name
function to use to compute value of the target field
https://scalalandio.github.io/chimney/#Providingmissingvalues for more details
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.
https://scalalandio.github.io/chimney/#Providingmissingvalues for more details
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.
source field in From
, defined like _.originalName
target field in To
, defined like _.newName
https://scalalandio.github.io/chimney/#Fieldre-labelling for more details
(Since version ) see corresponding Javadoc for more information.
Provides DSL for configuring io.scalaland.chimney.Transformer's generation and using the result to transform value at the same time
type of input value
type of output value
type-level encoded config