Companion
Collection of methods for reading and writing KotlinClassMetadata, as well as metadata kind constants.
Properties
A class file kind signifying that the corresponding class file contains a declaration of a Kotlin class.
A class file kind signifying that the corresponding class file is a compiled Kotlin file facade.
A class file kind signifying that the corresponding class file is a compiled multi-file class facade.
A class file kind signifying that the corresponding class file is a compiled multi-file class part, i.e., an internal class with method bodies and their metadata, accessed only from the corresponding facade.
A class file kind signifying that the corresponding class file is synthetic, e.g., it is a class for lambda, $DefaultImpls
class for interface method implementations, $WhenMappings
class for optimized when
over enums, etc.
Functions
Reads and parses the given annotation data of a Kotlin JVM class file and returns the correct type of KotlinClassMetadata encoded by this annotation. KotlinClassMetadata instances obtained from this method cannot be written.
Reads and parses the given annotation data of a Kotlin JVM class file and returns the correct type of KotlinClassMetadata encoded by this annotation, if the metadata version is supported.
Utility method to combine reading and writing of metadata: First, metadata is parsed with readStrict; then, transformer is called on a read instance. transformer may mutate passed instance of KotlinClassMetadata to achieve a desired result. After transformation, KotlinClassMetadata.write method is called and its result becomes return value of this method.