Fix obsolete information in kotlinx-metadata-jvm ReadMe.md

This commit is contained in:
Leonid Startsev
2023-07-17 15:26:34 +02:00
committed by Space Team
parent ece7dce2ae
commit a17cdfe338
+4 -3
View File
@@ -99,12 +99,13 @@ When using metadata writers from Kotlin source code, it is very convenient to us
// Writing metadata of a class
val klass = KmClass().apply {
// Setting the name and the modifiers of the class.
// Flags are constructed by invoking "flagsOf(...)"
name = "MyClass"
flags = flagsOf(Flag.IS_PUBLIC)
visibility = Visibility.PUBLIC
// Adding one public primary constructor
constructors += KmConstructor(flagsOf(Flag.IS_PUBLIC, Flag.Constructor.IS_PRIMARY)).apply {
constructors += KmConstructor().apply {
visibility = Visibility.PUBLIC
isSecondary = false
// Setting the JVM signature (for example, to be used by kotlin-reflect)
signature = JvmMethodSignature("<init>", "()V")
}