scala.beans
package scala.beans
Members list
Type members
Classlikes
class BeanProperty extends StaticAnnotation
When attached to a field, this annotation adds a setter and a getter method following the Java Bean convention.
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.
Attributes
- Source
- BeanProperty.scala
- Supertypes
class BooleanBeanProperty extends StaticAnnotation
This annotation has the same functionality as scala.beans.BeanProperty
, but the generated Bean getter will be named isFieldName
instead of getFieldName
.
This annotation has the same functionality as scala.beans.BeanProperty
, but the generated Bean getter will be named isFieldName
instead of getFieldName
.
Attributes
- Source
- BooleanBeanProperty.scala
- Supertypes
In this article