I'm writing a file with extensions functions as ut...
# announcements
f
I'm writing a file with extensions functions as utilities that I want to use in Java as well. By adding
@file:JvmName("MetricUtils")
of the beginning of the file with this extension function
Copy code
val Int.px: Int
    @JvmName("dpToPx")
    get() = (this * Resources.getSystem().displayMetrics.density).toInt()
I'm able to call this in Java
MetricUtils.dpToPx(12);
and
12.px
in Kotlin In java I get this in the suggestions when typing
dpToPx(int $receiver)
, is it possible to rename the parameter
$receiver
to something else?