In Kotlin it is easy to make type safe frameworks that no longer need strings to refer to properties because we can use classname::propertyname to get a KProperty - which is a typeful reference to the actual thing. This solves one of my biggest complaints on Java
But this only works for kotlin classes, sadly enough. While “properties” on a Java class can be accessed with Kotlin property syntax the same does not go for property reference: it seems to be impossible to get a KProperty using the same syntax. This is bad news because it means lot of legacy code cannot be used with newer framework code that would try to use Kotlin property references.
Is there a reason for this “omission”, and can anyone think of a workaround?