Let's say that we have a callback in Kotlin:
object Utils {
internal var callback: (() -> Unit)? = null
}
And then we call that callback from a Java class :
Utils.INSTANCE.setCallback$app_debug(new Function0<Unit>() {
@Override
public Unit invoke() {
return null;
}
});
So i have to questions :
- How can i convert the
Unittovoidbecause i'm forced to return a value ? - How can i change the name of the callback setter than
setCallback$app_debug?