Do not Generate Getter Setter for Kotlin Property

March 18, 2019
Use @JvmField

By default, Kotlin will generate getter/setter for public property.

Use @JvmField to

Instructs the Kotlin compiler not to generate getters/setters for this property and expose it as a field.

class Test (
    var sequenceNumber: Int = 0
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.