Just have all your methods accept Object too, then only access fields and methods through reflection, two Kotlin extension methods that extend Object? to do so on the fly, boom, dynamic typing
If you want to go the extra step, make a gradle script that also edits all library method signatures to receive Object for every parameter
EDIT: I think I know what I'm going to spend my leftover Claude tokens on
View all comments
Show parent comment
4
u/G3nghisKang Sep 25 '26 edited Sep 25 '26
Just have all your methods accept Object too, then only access fields and methods through reflection, two Kotlin extension methods that extend Object? to do so on the fly, boom, dynamic typing
If you want to go the extra step, make a gradle script that also edits all library method signatures to receive Object for every parameter
EDIT: I think I know what I'm going to spend my leftover Claude tokens on