This is a common question. Say I have an extension function written in kotlin that converts DP to PX and returns NonNull Int
fun Int.toPx() { }
A function in java will look something like this:
public int toPx(int $receiver) { }
In my opinion, $receivermakes Java-interop feel generated and unattractive.
I know that you can use annotation @JvmNamewith some combinations, such as @file:JvmNameto change the name in java.
When I try to use @JvmNamewith the target site receiver, it says
"This annotation is not applicable to the target type usageand uses the target @receiver"
Is there a way to overcome this and change the name of the recipient, and if there is no better alternative.