diff options
author | Burak Emir <emir@epfl.ch> | 2006-10-19 13:45:44 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-10-19 13:45:44 +0000 |
commit | c10e1f0cab16917b775e7fcf790ca82af7f42783 (patch) | |
tree | d12fd2828e096a66803a138c49deb9b8a9b9fcae /src/library | |
parent | 2cf278b25baf138c0a9775bcbe7bc97b4b548139 (diff) | |
download | scala-c10e1f0cab16917b775e7fcf790ca82af7f42783.tar.gz scala-c10e1f0cab16917b775e7fcf790ca82af7f42783.tar.bz2 scala-c10e1f0cab16917b775e7fcf790ca82af7f42783.zip |
comment
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/reflect/BeanProperty.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/library/scala/reflect/BeanProperty.scala b/src/library/scala/reflect/BeanProperty.scala index c30c05db18..beba9fa418 100644 --- a/src/library/scala/reflect/BeanProperty.scala +++ b/src/library/scala/reflect/BeanProperty.scala @@ -11,4 +11,24 @@ package scala.reflect +/** + * This attribute adds a setter and a getter method, following the + Java Bean convention (first letter of the property is capitalized) used +by popular Java web frameworks. +For example +<pre> + [BeanProperty] + var status = "" +</pre> +<p> adds the following methods to the <b>generated</b> code </p> +<pre> + def setStatus(s:String): Unit = { this.status = s } + def getStatus: String = { this.status } +</pre> + * + <p> + However, you cannot call <code>setStatus</code> from Scala, you should + use the normal Scala access and assignment. + </p> + */ class BeanProperty extends Attribute |