As far as I know @BeanProperty, getter is synthesized for fields valand setter, as well as for var. It is not possible to generate only setters, so you must explicitly write the setter and not use @BeanProperty:
private var status = ""
def setStatus(s: String) {
this.status = s
}
Pay attention to the field modifier private. Without it, a status()Scala-line getter will still be generated . For some reason, it is also generated using private var, but it is closed.
source
share