This repository was archived by the owner on Jan 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
src/main/kotlin/com/mapk/kmapper Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 11package com.mapk.kmapper
22
33import com.mapk.core.EnumMapper
4+ import com.mapk.core.ValueParameter
45import kotlin.reflect.KClass
56import kotlin.reflect.KFunction
6- import kotlin.reflect.KParameter
77import kotlin.reflect.full.isSuperclassOf
88
9- internal class PlainParameterForMap <T : Any > private constructor(
10- val param : KParameter ,
11- private val clazz : KClass <T >,
9+ internal class PlainParameterForMap <T : Any >(
10+ param : ValueParameter <T >,
1211 private val parameterNameConverter : (String ) -> String
1312) {
13+ private val clazz: KClass <T > = param.requiredClazz
14+
1415 private val javaClazz: Class <T > by lazy {
1516 clazz.java
1617 }
@@ -38,10 +39,4 @@ internal class PlainParameterForMap<T : Any> private constructor(
3839 else -> PlainKMapper (clazz, parameterNameConverter).map(value, PARAMETER_DUMMY )
3940 }
4041 }
41-
42- companion object {
43- fun newInstance (param : KParameter , parameterNameConverter : (String ) -> String ): PlainParameterForMap <* > {
44- return PlainParameterForMap (param, param.type.classifier as KClass <* >, parameterNameConverter)
45- }
46- }
4742}
You can’t perform that action at this time.
0 commit comments