final class PatcherDefinition[From, To, Cfg <: PatcherCfg, Flags <: PatcherFlags] extends PatcherFlagsDsl[[Flags1]PatcherDefinition[From, To, Cfg, Flags1], Flags]
Allows customization of io.scalaland.chimney.Patcher derivation.
- Cfg
type-level encoded config
- Flags
type-level encoded flags
- Since
0.8.0
- Alphabetic
- By Inheritance
- PatcherDefinition
- PatcherFlagsDsl
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PatcherDefinition()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- macro def buildPatcher[ImplicitScopeFlags <: PatcherFlags](implicit tc: PatcherConfiguration[ImplicitScopeFlags]): Patcher[From, To]
Build Patcher using current configuration.
Build Patcher using current configuration.
It runs macro that tries to derive instance of
Patcher[From, To]. When transformation can't be derived, it results with compilation error.- returns
io.scalaland.chimney.Patcher type class instance
- Since
0.8.0
- def clearOnNoneInPatch: PatcherDefinition[From, To, Cfg, Disable[IgnoreNoneInPatch, Flags]]
Then there Option is patching Option, on None value will be cleared.
Then there Option is patching Option, on None value will be cleared.
- Definition Classes
- PatcherFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/supported-patching/#treating-none-as-no-update-instead-of-set-to-none for more details
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def disableMacrosLogging: PatcherDefinition[From, To, Cfg, Disable[MacrosLogging, Flags]]
Disable printing the logs from the derivation process.
Disable printing the logs from the derivation process.
- Definition Classes
- PatcherFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/troubleshooting/#debugging-macros for more details
- def enableMacrosLogging: PatcherDefinition[From, To, Cfg, Enable[MacrosLogging, Flags]]
Enable printing the logs from the derivation process.
Enable printing the logs from the derivation process.
- Definition Classes
- PatcherFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/troubleshooting/#debugging-macros for more details
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def failRedundantPatcherFields: PatcherDefinition[From, To, Cfg, Disable[IgnoreRedundantPatcherFields, Flags]]
Fail the compilation if there is a redundant field in patching object.
Fail the compilation if there is a redundant field in patching object.
- Definition Classes
- PatcherFlagsDsl
- Since
0.8.0
- See also
https://chimney.readthedocs.io/supported-patching/#ignoring-fields-in-patches for more details
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def ignoreNoneInPatch: PatcherDefinition[From, To, Cfg, Enable[IgnoreNoneInPatch, Flags]]
In case when both object to patch and patch value contain field of type
Option[T], this option allows to treatNonevalue in patch like the value was not provided.In case when both object to patch and patch value contain field of type
Option[T], this option allows to treatNonevalue in patch like the value was not provided.By default, when
Noneis delivered in patch, Chimney clears the value of such field on patching.- Definition Classes
- PatcherFlagsDsl
- Since
0.4.0
- See also
https://chimney.readthedocs.io/supported-patching/#treating-none-as-no-update-instead-of-set-to-none for more details
- def ignoreRedundantPatcherFields: PatcherDefinition[From, To, Cfg, Enable[IgnoreRedundantPatcherFields, Flags]]
In case that patch object contains a redundant field (i.e.
In case that patch object contains a redundant field (i.e. field that is not present in patched object type), this option enables ignoring value of such fields and generate patch successfully.
By default, when Chimney detects a redundant field in patch object, it fails the compilation in order to prevent silent oversight of field name typos.
- Definition Classes
- PatcherFlagsDsl
- Since
0.4.0
- See also
https://chimney.readthedocs.io/supported-patching/#ignoring-fields-in-patches for more details
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()