1
- package com.fasterxml .jackson.module.kotlin
1
+ package tools .jackson.module.kotlin
2
2
3
+ import tools.jackson.core.json.PackageVersion
3
4
import tools.jackson.databind.MapperFeature
4
5
import tools.jackson.databind.module.SimpleModule
5
- import com.fasterxml .jackson.module.kotlin.KotlinFeature.NullIsSameAsDefault
6
- import com.fasterxml .jackson.module.kotlin.KotlinFeature.NullToEmptyCollection
7
- import com.fasterxml .jackson.module.kotlin.KotlinFeature.NullToEmptyMap
8
- import com.fasterxml .jackson.module.kotlin.KotlinFeature.StrictNullChecks
9
- import com.fasterxml .jackson.module.kotlin.SingletonSupport.CANONICALIZE
10
- import com.fasterxml .jackson.module.kotlin.SingletonSupport.DISABLED
6
+ import tools .jackson.module.kotlin.KotlinFeature.NullIsSameAsDefault
7
+ import tools .jackson.module.kotlin.KotlinFeature.NullToEmptyCollection
8
+ import tools .jackson.module.kotlin.KotlinFeature.NullToEmptyMap
9
+ import tools .jackson.module.kotlin.KotlinFeature.StrictNullChecks
10
+ import tools .jackson.module.kotlin.SingletonSupport.CANONICALIZE
11
+ import tools .jackson.module.kotlin.SingletonSupport.DISABLED
11
12
import java.util.*
12
13
import kotlin.reflect.KClass
13
14
@@ -26,7 +27,7 @@ fun Class<*>.isKotlinClass(): Boolean {
26
27
* @param nullIsSameAsDefault Default false. Whether to treat null values as absent when deserializing, thereby
27
28
* using the default value provided in Kotlin.
28
29
* @param singletonSupport Default: DISABLED. Mode for singleton handling.
29
- * See {@link com.fasterxml .jackson.module.kotlin.SingletonSupport label}
30
+ * See {@link tools .jackson.module.kotlin.SingletonSupport label}
30
31
* @param strictNullChecks Default: false. Whether to check deserialized collections. With this disabled,
31
32
* the default, collections which are typed to disallow null members
32
33
* (e.g. List<String>) may contain null values after deserialization. Enabling it
@@ -44,7 +45,7 @@ class KotlinModule @Deprecated(
44
45
.configure(KotlinFeature.SingletonSupport, singletonSupport)
45
46
.configure(KotlinFeature.StrictNullChecks, strictNullChecks)
46
47
.build()""" ,
47
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
48
+ " tools .jackson.module.kotlin.KotlinFeature"
48
49
)
49
50
) constructor(
50
51
val reflectionCacheSize : Int = 512 ,
@@ -176,7 +177,7 @@ class KotlinModule @Deprecated(
176
177
message = " Deprecated, use isEnabled(NullToEmptyCollection) instead." ,
177
178
replaceWith = ReplaceWith (
178
179
" isEnabled(KotlinFeature.NullToEmptyCollection)" ,
179
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
180
+ " tools .jackson.module.kotlin.KotlinFeature"
180
181
)
181
182
)
182
183
fun getNullToEmptyCollection (): Boolean =
@@ -186,7 +187,7 @@ class KotlinModule @Deprecated(
186
187
message = " Deprecated, use configure(NullToEmptyCollection, enabled) instead." ,
187
188
replaceWith = ReplaceWith (
188
189
" configure(KotlinFeature.NullToEmptyCollection, nullToEmptyCollection)" ,
189
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
190
+ " tools .jackson.module.kotlin.KotlinFeature"
190
191
)
191
192
)
192
193
fun nullToEmptyCollection (nullToEmptyCollection : Boolean ): Builder =
@@ -196,7 +197,7 @@ class KotlinModule @Deprecated(
196
197
message = " Deprecated, use isEnabled(NullToEmptyMap) instead." ,
197
198
replaceWith = ReplaceWith (
198
199
" isEnabled(KotlinFeature.NullToEmptyMap)" ,
199
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
200
+ " tools .jackson.module.kotlin.KotlinFeature"
200
201
)
201
202
)
202
203
fun getNullToEmptyMap (): Boolean =
@@ -206,7 +207,7 @@ class KotlinModule @Deprecated(
206
207
message = " Deprecated, use configure(NullToEmptyMap, enabled) instead." ,
207
208
replaceWith = ReplaceWith (
208
209
" configure(KotlinFeature.NullToEmptyMap, nullToEmptyMap)" ,
209
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
210
+ " tools .jackson.module.kotlin.KotlinFeature"
210
211
)
211
212
)
212
213
fun nullToEmptyMap (nullToEmptyMap : Boolean ): Builder =
@@ -216,7 +217,7 @@ class KotlinModule @Deprecated(
216
217
message = " Deprecated, use isEnabled(NullIsSameAsDefault) instead." ,
217
218
replaceWith = ReplaceWith (
218
219
" isEnabled(KotlinFeature.NullIsSameAsDefault)" ,
219
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
220
+ " tools .jackson.module.kotlin.KotlinFeature"
220
221
)
221
222
)
222
223
fun getNullIsSameAsDefault (): Boolean =
@@ -226,7 +227,7 @@ class KotlinModule @Deprecated(
226
227
message = " Deprecated, use configure(NullIsSameAsDefault, enabled) instead." ,
227
228
replaceWith = ReplaceWith (
228
229
" configure(KotlinFeature.NullIsSameAsDefault, nullIsSameAsDefault)" ,
229
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
230
+ " tools .jackson.module.kotlin.KotlinFeature"
230
231
)
231
232
)
232
233
fun nullIsSameAsDefault (nullIsSameAsDefault : Boolean ): Builder =
@@ -236,7 +237,7 @@ class KotlinModule @Deprecated(
236
237
message = " Deprecated, use isEnabled(SingletonSupport) instead." ,
237
238
replaceWith = ReplaceWith (
238
239
" isEnabled(KotlinFeature.SingletonSupport)" ,
239
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
240
+ " tools .jackson.module.kotlin.KotlinFeature"
240
241
)
241
242
)
242
243
fun getSingletonSupport (): SingletonSupport =
@@ -249,7 +250,7 @@ class KotlinModule @Deprecated(
249
250
message = " Deprecated, use configure(SingletonSupport, enabled) instead." ,
250
251
replaceWith = ReplaceWith (
251
252
" configure(KotlinFeature.SingletonSupport, singletonSupport)" ,
252
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
253
+ " tools .jackson.module.kotlin.KotlinFeature"
253
254
)
254
255
)
255
256
fun singletonSupport (singletonSupport : SingletonSupport ): Builder =
@@ -262,7 +263,7 @@ class KotlinModule @Deprecated(
262
263
message = " Deprecated, use isEnabled(StrictNullChecks) instead." ,
263
264
replaceWith = ReplaceWith (
264
265
" isEnabled(KotlinFeature.StrictNullChecks)" ,
265
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
266
+ " tools .jackson.module.kotlin.KotlinFeature"
266
267
)
267
268
)
268
269
fun getStrictNullChecks (): Boolean =
@@ -272,7 +273,7 @@ class KotlinModule @Deprecated(
272
273
message = " Deprecated, use configure(StrictNullChecks, enabled) instead." ,
273
274
replaceWith = ReplaceWith (
274
275
" configure(KotlinFeature.StrictNullChecks, strictNullChecks)" ,
275
- " com.fasterxml .jackson.module.kotlin.KotlinFeature"
276
+ " tools .jackson.module.kotlin.KotlinFeature"
276
277
)
277
278
)
278
279
fun strictNullChecks (strictNullChecks : Boolean ): Builder =
0 commit comments