MappingCodeGenerator
Generates per-field mapping expressions using KotlinPoet, dispatching on the scalar fallback ladder's landing shape:
LandingShape.HARD — non-null target without a usable default (ladder rows 1/5): the
convertOrFailseam; absence and brokenness both surface as hard errors.LandingShape.NULLABLE — nullable target (rows 3/7):
convertOrNull(Auto) orconvertOrNullStrict(OnFail.Throw); broken absorbs to null (reported) under Auto.LandingShape.COPY — defaulted target built in the
.copy()stage (rows 2/4/6/8):convertOrElse(Auto) orconvertOrElseStrictwithbase.<field>as the fallback.
Path literals are the TARGET field name (single segment — nesting prefixes accumulate at runtime via MappingException.withPathPrefix; element seams append their own [i] / ["key"] segments); type literals are codegen string literals (fully-qualified for converter pairs and collection elements, simple class names for scalar nested mappers) so release builds stay readable under R8 without a mapping file.