Calling a method with lambda + receiver param from Java



is it currently possible to call a Kotlin method which has a lambda parameter with receiver from Java? Something like

fun serviceProxy(init: ServiceProxySpec.() -> Unit)



Yes, ServiceProxySpec is the parameter of init.


I don’t quite understand

Calling from Kotlin it would look something like

serviceProxy {

But from Java? How would the call look like? Something like this?

.serviceProxy(s -> s

FileNameKt.serviceProxy(s -> {;;
    return Unit.INSTANCE;