Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 4c63da5

Browse files
committed
デシリアライザーの取得を仮追加
1 parent 5e1d1bd commit 4c63da5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/kotlin/com/mapk/krowmapper/ParameterForMap.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.mapk.krowmapper
22

3+
import com.mapk.annotations.KColumnDeserialize
34
import com.mapk.annotations.KParameterAlias
45
import kotlin.reflect.KClass
56
import kotlin.reflect.KParameter
@@ -12,9 +13,12 @@ class ParameterForMap<D : Any> private constructor(
1213
companion object {
1314
fun newInstance(param: KParameter, propertyNameConverter: (String) -> String = { it }): ParameterForMap<*> {
1415
var alias: String? = null
16+
var deserializer: KColumnDeserializer<*, *>
1517

1618
param.annotations.forEach {
1719
if (it is KParameterAlias) alias = it.value
20+
if (it is KColumnDeserialize) deserializer = it.deserializer.objectInstance
21+
?: throw IllegalArgumentException("Deserializer class must be object.")
1822
}
1923

2024
return ParameterForMap(

0 commit comments

Comments
 (0)