Skip to content

Commit 522a3c2

Browse files
committed
remove Method suffix from method name
1 parent 06fbd1e commit 522a3c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reflection/src/main/java/de/binarynoise/reflection/Reflection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class method(private val cls: Class<*>, private vararg val params: Class<*>) {
3434
c = c.superclass
3535
}
3636

37-
return methods.filter { it.name == property.name }
37+
return methods.filter { it.name == property.name.removeSuffix("Method") }
3838
.first { params.isEmpty() || (it.parameterTypes.map { t -> t.name }) == (params.map { p -> p.name }) }
3939
.makeAccessible()
4040
}

0 commit comments

Comments
 (0)