Class scala.beans.BeanProperty
@field @deprecatedInheritance("Scheduled for being final in the future", "2.13.0")
class
BeanProperty extends
StaticAnnotation
When attached to a field, this annotation adds a setter and a getter method following the Java Bean convention. For example:
@BeanProperty var status = ""
adds the following methods to the class:
def setStatus(s: String): Unit = { this.status = s } def getStatus(): String = this.status
For fields of type Boolean
, if you need a getter named isStatus
, use the scala.beans.BooleanBeanProperty
annotation instead.
Supertypes |
---|
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.1.1/scala/beans/BeanProperty.html