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

Commit 936e6cb

Browse files
committed
改名
1 parent 95555f0 commit 936e6cb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/kotlin/com/wrongwrong/mapk/core/CompanionKFunction.kt renamed to src/main/kotlin/com/wrongwrong/mapk/core/KFunctionWithInstance.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import kotlin.reflect.KParameter
55
import kotlin.reflect.full.instanceParameter
66
import kotlin.reflect.jvm.isAccessible
77

8-
internal class CompanionKFunction<T>(
8+
internal class KFunctionWithInstance<T>(
99
private val function: KFunction<T>,
1010
private val instance: Any
1111
) : KFunction<T> by function {

src/main/kotlin/com/wrongwrong/mapk/core/KMapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ internal fun <T : Any> getTarget(clazz: KClass<T>): KFunction<T> {
117117
clazz.companionObjectInstance?.let { companionObject ->
118118
companionObject::class.functions
119119
.filter { it.annotations.any { annotation -> annotation is KConstructor } }
120-
.map { CompanionKFunction(it, companionObject) as KFunction<T> }
120+
.map { KFunctionWithInstance(it, companionObject) as KFunction<T> }
121121
} ?: emptyList()
122122

123123
val constructors: List<KFunction<T>> = factoryConstructor + clazz.constructors

src/main/kotlin/com/wrongwrong/mapk/core/ParameterForMap.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private fun <T : Any> creatorsFromCompanionObject(clazz: KClass<T>): Set<Pair<KC
6666
companionObject::class.functions
6767
.filter { it.annotations.any { annotation -> annotation is KConverter } }
6868
.map { function ->
69-
val func: KFunction<T> = CompanionKFunction(function, companionObject) as KFunction<T>
69+
val func: KFunction<T> = KFunctionWithInstance(function, companionObject) as KFunction<T>
7070

7171
(func.parameters.single().type.classifier as KClass<*>) to func
7272
}.toSet()

0 commit comments

Comments
 (0)