rewrite

private fun rewrite(cap: MetaCapture, owner: String): Map<String, Any?>?

The rewritten @Metadata fields, or null to re-emit the original verbatim.

Kind gate: a snippet only ever compiles to Class(1) — its top-level declarations land ON the script class rather than a file facade, and its lambdas are indy, so they carry no @Metadata at all. Anything else is left alone, which is also what a proto this library cannot read gets: the bytecode is still correctly remapped, only reflection over that one class stays mojmap-blind. A throw must not escape — it would cost the whole module its bytecode remap, which is the larger of the two.