ralf
01/12/2017, 7:07 PM// MyClass.kt
@JvmField
val DEFAULT_FILTER: FilterObject = FilterObject.create()
class MyClass {…}
Problem is in Java I would have to use MyClassKt.DEFAULT_FILTER
. I’d like to get rid of the Kt
suffix. The const
keyword only works for primitives and Strings. A companion object doesn’t work either, then it would look like this MyClass.Companion.getDEFAULT_FILTER()
.
What’s a better way?