MappingStrategy
Strategy for mapping a field from source to target.
Inheritors
Types
Collection mapping: elements ride the convertEach… element seams, selected by the (target element shape × onFail) table — e.g. tags.convertEachOrSkip("tags", from, to) { … }. Direct same-type elements keep the container passthrough (no seam); container-level null handling stays separate (scope separation: element failure never escalates to the container).
Converter call resolved orientation-aware.
Direct assignment (same type, nullable compatible).
Wire-backed enum mapping: source wire value → target enum via MappableEnum.entries.
Enum → wire value mapping via MappableEnum.wireValue.
External field (comes from function parameter).
Mapprices["usd"]), selected by the (target value shape × onFail) table — e.g. prices.convertEntriesOrSkip("prices", keyFrom, keyTo, valueFrom, valueTo, { it }) { … }. Keys stay same-type in v1 (the identity lambda fills the seam's convertKey slot); different key types → Unmappable. Direct same-type values keep the container passthrough (no seam). Plain kotlin.collections.Map only; PersistentMap/ImmutableMap wrappers are deferred.
Nested object mapping (recursive mapper call).
Source field type is arrow.core.Option<Inner>. Target field is Inner? or Inner (non-null guarded by existing RequiredFieldMissing path). Detection: matched by source-type FQN string "arrow.core.Option".
Target field type is arrow.core.Option<Inner>. Source field is Inner (non-null) or Inner? (nullable). Detection: matched by target-type FQN string "arrow.core.Option" — no arrow Gradle dep needed.
Wire String → enum via kotlinx.serialization @Serializable/@SerialName (the MappableEnum-free path). entries is the resolved entrySimpleName → wireValue list (wireValue = @SerialName argument, else the entry name); the generator emits a compile-time when over these — no runtime serializer. Wire type is always String.
Enum → wire String via @Serializable/@SerialName — the mirror of SerializableEnumFromWire; generated as a when mapping each entry to its wire literal.
No mapping strategy could be determined (type mismatch without a converter). The generator skips this field entirely; the processor emits a compile error.
Collection mapping whose container shell is handled by a @CollectionWrapper object, in either direction. Element conversion stays on the normal seam rails: forward (wrap): WrapperObject.wrap(<element seam chain>) reverse (unwrap): WrapperObject.unwrap(source).<element seam chain>