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

Commit d7ee597

Browse files
committed
適切なスコープに修正
1 parent d2aa1a2 commit d7ee597

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/kotlin/com/mapk/kmapper/BoundParameterForMap.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@ import kotlin.reflect.jvm.javaGetter
1313
@Suppress("UNCHECKED_CAST")
1414
internal sealed class BoundParameterForMap<S> {
1515
abstract val param: KParameter
16-
abstract val propertyGetter: Method
16+
protected abstract val propertyGetter: Method
1717

1818
abstract fun map(src: S): Any?
1919

20-
class Plain<S : Any>(
20+
private class Plain<S : Any>(
2121
override val param: KParameter,
2222
override val propertyGetter: Method
2323
) : BoundParameterForMap<S>() {
2424
override fun map(src: S): Any? = propertyGetter.invoke(src)
2525
}
2626

27-
class UseConverter<S : Any>(
27+
private class UseConverter<S : Any>(
2828
override val param: KParameter,
2929
override val propertyGetter: Method,
3030
private val converter: KFunction<*>
3131
) : BoundParameterForMap<S>() {
3232
override fun map(src: S): Any? = converter.call(propertyGetter.invoke(src))
3333
}
3434

35-
class ToEnum<S : Any>(
35+
private class ToEnum<S : Any>(
3636
override val param: KParameter,
3737
override val propertyGetter: Method,
3838
private val paramClazz: Class<*>
3939
) : BoundParameterForMap<S>() {
4040
override fun map(src: S): Any? = EnumMapper.getEnum(paramClazz, propertyGetter.invoke(src) as String)
4141
}
4242

43-
class ToString<S : Any>(
43+
private class ToString<S : Any>(
4444
override val param: KParameter,
4545
override val propertyGetter: Method
4646
) : BoundParameterForMap<S>() {

0 commit comments

Comments
 (0)