Did anyone manage to bind the setter of a Java object when using Kotlin. Like this
binder.forField(acceptThresholdField)
.withConverter(DoubleToLongConverter)
.bind(KeyPage::getAcceptThreshold, KeyPage::setAcceptThreshold)
}
The compiler shows an error on KeyPage::setAcceptThreshold:
Type mismatch.
Required:
((KeyPage!, Long?) → Unit)!
Found:
KFunction2<KeyPage, Long, Unit>
For internal objects I can use “KeyPage::acceptThreshold.setter” but in this case I am dealing with a class from an external Java library.