Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.beans

scala.beans

Members list

Type members

Classlikes

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:

@BeanPropertyvar status = ""

adds the following methods to the class:

def setStatus(s: String): Unit = { this.status = s }def getStatus(): String = this.status

For fields of typeBoolean, if you need a getter namedisStatus, use thescala.beans.BooleanBeanProperty annotation instead.

In Scala 2, the added methods are visible from both Scala and Java.

In Scala 3, that has changed. The added methods are only visible from Java (including via Java reflection).

Attributes

Source
BeanProperty.scala
Supertypes
classObject
traitMatchable
classAny

This annotation has the same functionality asscala.beans.BeanProperty, but the generated Bean getter will be namedisFieldName instead ofgetFieldName.

This annotation has the same functionality asscala.beans.BeanProperty, but the generated Bean getter will be namedisFieldName instead ofgetFieldName.

Attributes

Source
BooleanBeanProperty.scala
Supertypes
classObject
traitMatchable
classAny
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp