rewriteMetadata

private fun rewriteMetadata(cap: MetaCapture, owner: String, rename: OverlayRename?): Map<String, Any?>?

Open private/protected/private-to-this → public in a Kotlin class's @Metadata proto, realign its moduleName (see alignModuleName), and — when rename is set — rewrite its runtime classifiers to mojmap so the proto agrees with the bytecode ClassRemapper just rewrote. Returns the fields to re-emit if anything changed, null otherwise. Uses kotlin-metadata-jvm's STRICT read: the lenient read forbids write-back, and strict read/write throw for metadata older than 1.4 or newer than this lib + 1 minor — caught by the caller, leaving that class closed.