Use standard @Deprecated in place of special opt-in annotation
Remove @DeprecatedVisitor
This commit is contained in:
committed by
Space Team
parent
c4d409608c
commit
474ef921d8
@@ -2,10 +2,10 @@
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package kotlinx.metadata.klib
|
||||
|
||||
import kotlinx.metadata.DeprecatedVisitor
|
||||
import kotlinx.metadata.KmAnnotation
|
||||
import kotlinx.metadata.KmModuleFragment
|
||||
import kotlinx.metadata.impl.WriteContext
|
||||
@@ -79,7 +79,6 @@ class KlibModuleMetadata(
|
||||
* Deserializes metadata from the given [library].
|
||||
* @param readStrategy specifies the way module fragments of a single package are modified (e.g. merged) after deserialization.
|
||||
*/
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
fun read(
|
||||
library: MetadataLibraryProvider,
|
||||
readStrategy: KlibModuleFragmentReadStrategy = KlibModuleFragmentReadStrategy.DEFAULT
|
||||
@@ -103,7 +102,6 @@ class KlibModuleMetadata(
|
||||
* Writes metadata back to serialized representation.
|
||||
* @param writeStrategy specifies the way module fragments are modified (e.g. split) before serialization.
|
||||
*/
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
fun write(
|
||||
writeStrategy: KlibModuleFragmentWriteStrategy = KlibModuleFragmentWriteStrategy.DEFAULT
|
||||
): SerializedKlibMetadata {
|
||||
|
||||
+1
-10
@@ -2,6 +2,7 @@
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package kotlinx.metadata.klib.impl
|
||||
|
||||
@@ -9,43 +10,33 @@ import kotlinx.metadata.*
|
||||
import kotlinx.metadata.impl.extensions.*
|
||||
import kotlinx.metadata.klib.*
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmFunction.klibExtensions: KlibFunctionExtension
|
||||
get() = visitExtensions(KlibFunctionExtensionVisitor.TYPE) as KlibFunctionExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmClass.klibExtensions: KlibClassExtension
|
||||
get() = visitExtensions(KlibClassExtensionVisitor.TYPE) as KlibClassExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmType.klibExtensions: KlibTypeExtension
|
||||
get() = visitExtensions(KlibTypeExtensionVisitor.TYPE) as KlibTypeExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmProperty.klibExtensions: KlibPropertyExtension
|
||||
get() = visitExtensions(KlibPropertyExtensionVisitor.TYPE) as KlibPropertyExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmConstructor.klibExtensions: KlibConstructorExtension
|
||||
get() = visitExtensions(KlibConstructorExtensionVisitor.TYPE) as KlibConstructorExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmTypeParameter.klibExtensions: KlibTypeParameterExtension
|
||||
get() = visitExtensions(KlibTypeParameterExtensionVisitor.TYPE) as KlibTypeParameterExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmPackage.klibExtensions: KlibPackageExtension
|
||||
get() = visitExtensions(KlibPackageExtensionVisitor.TYPE) as KlibPackageExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmModuleFragment.klibExtensions: KlibModuleFragmentExtension
|
||||
get() = visitExtensions(KlibModuleFragmentExtensionVisitor.TYPE) as KlibModuleFragmentExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmTypeAlias.klibExtensions: KlibTypeAliasExtension
|
||||
get() = visitExtensions(KlibTypeAliasExtensionVisitor.TYPE) as KlibTypeAliasExtension
|
||||
|
||||
@OptIn(DeprecatedVisitor::class)
|
||||
internal val KmValueParameter.klibExtensions: KlibValueParameterExtension
|
||||
get() = visitExtensions(KlibValueParameterExtensionVisitor.TYPE) as KlibValueParameterExtension
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.serialization.StringTableImpl
|
||||
|
||||
@OptIn(DeprecatedVisitor::class) // TODO
|
||||
@Suppress("DEPRECATION", "DEPRECATION_ERROR")
|
||||
internal class KlibMetadataExtensions : MetadataExtensions {
|
||||
|
||||
private fun ReadContext.getSourceFile(index: Int) =
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package kotlinx.metadata.klib.impl
|
||||
|
||||
import kotlinx.metadata.DeprecatedVisitor
|
||||
import kotlinx.metadata.impl.*
|
||||
import kotlinx.metadata.klib.KlibSourceFile
|
||||
import org.jetbrains.kotlin.library.metadata.KlibMetadataProtoBuf
|
||||
@@ -26,7 +26,6 @@ class ReverseSourceFileIndexWriteExtension : WriteContextExtension {
|
||||
}
|
||||
}
|
||||
|
||||
@DeprecatedVisitor
|
||||
class KlibModuleFragmentWriter(
|
||||
stringTable: ApproximatingStringTable,
|
||||
contextExtensions: List<WriteContextExtension> = emptyList()
|
||||
|
||||
+1
@@ -2,6 +2,7 @@
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package kotlinx.metadata.klib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user