KotlinModuleMetadata

Represents the parsed metadata of a Kotlin JVM module file.

To create an instance of KotlinModuleMetadata, load the contents of the .kotlin_module file into a byte array and call KotlinModuleMetadata.read. Then it is possible to transform the result into KmModule with KotlinModuleMetadata.toKmModule.

.kotlin_module file is produced per Kotlin compilation, and contains auxiliary information, such as a map of all single- and multi-file facades (KmModule.packageParts), @OptionalExpectation declarations (KmModule.optionalAnnotationClasses), and module annotations ([KmModule.annotations).

Constructors

Link copied to clipboard
constructor(kmModule: KmModule, version: JvmMetadataVersion)

Types

Link copied to clipboard
object Companion

Collection of methods for reading and writing KotlinModuleMetadata.

Properties

Link copied to clipboard

KmModule representation of this metadata.

Link copied to clipboard

Version of this metadata.

Functions

Link copied to clipboard

Encodes and writes this metadata of the Kotlin module file.