1
1
/*
2
- * Copyright 2017-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2017-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
- @file:Suppress(" NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING" ) // Parameters of annotations should probably be ignored, too
6
-
7
5
package kotlinx.serialization
8
6
9
7
import kotlinx.serialization.descriptors.*
@@ -149,13 +147,15 @@ public annotation class Serializer(
149
147
* If a name of class or property is overridden with this annotation, original source code name is not available for the library.
150
148
* Tools like `JsonNamingStrategy` and `ProtoBufSchemaGenerator` would see and transform [value] from [SerialName] annotation.
151
149
*/
150
+ @MustBeDocumented
152
151
@Target(AnnotationTarget .PROPERTY , AnnotationTarget .CLASS )
153
152
// @Retention(AnnotationRetention.RUNTIME) still runtime, but KT-41082
154
153
public annotation class SerialName (val value : String )
155
154
156
155
/* *
157
156
* Indicates that property must be present during deserialization process, despite having a default value.
158
157
*/
158
+ @MustBeDocumented
159
159
@Target(AnnotationTarget .PROPERTY )
160
160
// @Retention(AnnotationRetention.RUNTIME) still runtime, but KT-41082
161
161
public annotation class Required
@@ -164,6 +164,7 @@ public annotation class Required
164
164
* Marks this property invisible for the whole serialization process, including [serial descriptors][SerialDescriptor].
165
165
* Transient properties must have default values.
166
166
*/
167
+ @MustBeDocumented
167
168
@Target(AnnotationTarget .PROPERTY )
168
169
// @Retention(AnnotationRetention.RUNTIME) still runtime, but KT-41082
169
170
public annotation class Transient
@@ -189,6 +190,7 @@ public annotation class Transient
189
190
* @see EncodeDefault.Mode.ALWAYS
190
191
* @see EncodeDefault.Mode.NEVER
191
192
*/
193
+ @MustBeDocumented
192
194
@Target(AnnotationTarget .PROPERTY )
193
195
@ExperimentalSerializationApi
194
196
public annotation class EncodeDefault (val mode : Mode = Mode .ALWAYS ) {
@@ -267,7 +269,6 @@ public annotation class SerialInfo
267
269
@ExperimentalSerializationApi
268
270
public annotation class InheritableSerialInfo
269
271
270
-
271
272
/* *
272
273
* Instructs the plugin to use [ContextualSerializer] on a given property or type.
273
274
* Context serializer is usually used when serializer for type can only be found in runtime.
0 commit comments