Join Slack
Powered by
Is there a way to change the name of the variable ...
# announcements
q
Quy D X Nguyen
05/31/2019, 7:57 PM
Is there a way to change the name of the variable that holds kotlin objects?
g
gildor
06/01/2019, 6:26 AM
Yes, just add desired name after
companion object
gildor
06/01/2019, 6:41 AM
Like:
Copy code
companion object SomeName { }
s
Stephan Schroeder
06/03/2019, 9:17 AM
@Quy D X Nguyen
and if you’re talking about the representation if you interact with your Kotlin code from the Java side, take a look at the @JvmName and @JvmStatic annotations
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/index.html
2
Views
Open in Slack
Previous
Next