diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-02-07 09:06:25 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-02-07 09:06:25 +0000 |
commit | e3b42865333ed502b3e454c98eefbfc705e33d82 (patch) | |
tree | 68982d6051371b3731c6918e44cc0d9788b15e59 /src/dotnet-library/scala/reflect/BeanProperty.scala | |
parent | 108db60672ffa6a70617f51b166d8c751d7e65bb (diff) | |
download | scala-e3b42865333ed502b3e454c98eefbfc705e33d82.tar.gz scala-e3b42865333ed502b3e454c98eefbfc705e33d82.tar.bz2 scala-e3b42865333ed502b3e454c98eefbfc705e33d82.zip |
Created src/dotnet-library from r9912 of src/li...
Created src/dotnet-library from r9912 of src/library
Diffstat (limited to 'src/dotnet-library/scala/reflect/BeanProperty.scala')
-rw-r--r-- | src/dotnet-library/scala/reflect/BeanProperty.scala | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/dotnet-library/scala/reflect/BeanProperty.scala b/src/dotnet-library/scala/reflect/BeanProperty.scala new file mode 100644 index 0000000000..beba9fa418 --- /dev/null +++ b/src/dotnet-library/scala/reflect/BeanProperty.scala @@ -0,0 +1,34 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +*/ + +// $Id$ + + +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 |