Use JvmName on kotlin.Metadata parameters to improve public API
#KT-26359 Fixed
This commit is contained in:
@@ -7,7 +7,7 @@ package kotlin
|
||||
|
||||
/**
|
||||
* This annotation is present on any class file produced by the Kotlin compiler and is read by the compiler and reflection.
|
||||
* Parameters have very short names on purpose: these names appear in the generated class files, and we'd like to reduce their size.
|
||||
* Parameters have very short JVM names on purpose: these names appear in all generated class files, and we'd like to reduce their size.
|
||||
*/
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@@ -24,35 +24,42 @@ public annotation class Metadata(
|
||||
*
|
||||
* The class file with a kind not listed here is treated as a non-Kotlin file.
|
||||
*/
|
||||
val k: Int = 1,
|
||||
@get:JvmName("k")
|
||||
val kind: Int = 1,
|
||||
/**
|
||||
* The version of the metadata provided in the arguments of this annotation.
|
||||
*/
|
||||
val mv: IntArray = [],
|
||||
@get:JvmName("mv")
|
||||
val metadataVersion: IntArray = [],
|
||||
/**
|
||||
* The version of the bytecode interface (naming conventions, signatures) of the class file annotated with this annotation.
|
||||
*/
|
||||
val bv: IntArray = [],
|
||||
@get:JvmName("bv")
|
||||
val bytecodeVersion: IntArray = [],
|
||||
/**
|
||||
* Metadata in a custom format. The format may be different (or even absent) for different kinds.
|
||||
*/
|
||||
val d1: Array<String> = [],
|
||||
@get:JvmName("d1")
|
||||
val data1: Array<String> = [],
|
||||
/**
|
||||
* An addition to [d1]: array of strings which occur in metadata, written in plain text so that strings already present
|
||||
* in the constant pool are reused. These strings may be then indexed in the metadata by an integer index in this array.
|
||||
*/
|
||||
val d2: Array<String> = [],
|
||||
@get:JvmName("d2")
|
||||
val data2: Array<String> = [],
|
||||
/**
|
||||
* An extra string. For a multi-file part class, internal name of the facade class.
|
||||
*/
|
||||
val xs: String = "",
|
||||
@get:JvmName("xs")
|
||||
val extraString: String = "",
|
||||
/**
|
||||
* Fully qualified name of the package this class is located in, from Kotlin's point of view, or empty string if this name
|
||||
* does not differ from the JVM's package FQ name. These names can be different in case the [JvmPackageName] annotation is used.
|
||||
* Note that this information is also stored in the corresponding module's `.kotlin_module` file.
|
||||
*/
|
||||
@SinceKotlin("1.2")
|
||||
val pn: String = "",
|
||||
@get:JvmName("pn")
|
||||
val packageName: String = "",
|
||||
/**
|
||||
* An extra int. Bits of this number represent the following flags:
|
||||
*
|
||||
@@ -63,5 +70,6 @@ public annotation class Metadata(
|
||||
* the major.minor version of this metadata ([mv]).
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
val xi: Int = 0
|
||||
@get:JvmName("xi")
|
||||
val extraInt: Int = 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user