diff --git a/serialization/src/commonMain/kotlin/nl/adaptivity/xmlutil/serialization/impl/ShadowPolicy.kt b/serialization/src/commonMain/kotlin/nl/adaptivity/xmlutil/serialization/impl/ShadowPolicy.kt index 3d8dccc69..3004fcbb2 100644 --- a/serialization/src/commonMain/kotlin/nl/adaptivity/xmlutil/serialization/impl/ShadowPolicy.kt +++ b/serialization/src/commonMain/kotlin/nl/adaptivity/xmlutil/serialization/impl/ShadowPolicy.kt @@ -20,6 +20,7 @@ package nl.adaptivity.xmlutil.serialization.impl +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.descriptors.SerialDescriptor import kotlinx.serialization.descriptors.SerialKind @@ -63,14 +64,20 @@ internal class ShadowPolicy(basePolicy: XmlSerializationPolicy, internal val cac return basePolicy.polymorphicDiscriminatorName(serializerParent, tagParent) } + @Suppress("DEPRECATION") + @Deprecated("It is recommended to override serialTypeNameToQName and serialUseNameToQName instead") override fun serialNameToQName(serialName: String, parentNamespace: Namespace): QName { return basePolicy.serialNameToQName(serialName, parentNamespace) } + @Suppress("DEPRECATION") + @Deprecated("Don't use or implement this, use the 3 parameter version") override fun effectiveOutputKind(serializerParent: SafeParentInfo, tagParent: SafeParentInfo): OutputKind { return basePolicy.effectiveOutputKind(serializerParent, tagParent) } + @Suppress("DEPRECATION") + @Deprecated("Use the recoverable version that allows returning a value") override fun handleUnknownContent( input: XmlReader, inputKind: InputKind, @@ -88,8 +95,12 @@ internal class ShadowPolicy(basePolicy: XmlSerializationPolicy, internal val cac get() = basePolicy.defaultPrimitiveOutputKind override val defaultObjectOutputKind: OutputKind get() = basePolicy.defaultObjectOutputKind + + @Suppress("DEPRECATION") + @Deprecated("Use isStrictAttributeNames instead") override val isStrictNames: Boolean get() = basePolicy.isStrictNames + override val isStrictAttributeNames: Boolean get() = basePolicy.isStrictAttributeNames override val isStrictBoolean: Boolean @@ -101,6 +112,7 @@ internal class ShadowPolicy(basePolicy: XmlSerializationPolicy, internal val cac override val verifyElementOrder: Boolean get() = basePolicy.verifyElementOrder + @OptIn(ExperimentalSerializationApi::class) @ExperimentalXmlUtilApi override fun defaultOutputKind(serialKind: SerialKind): OutputKind { return basePolicy.defaultOutputKind(serialKind)