summaryrefslogtreecommitdiff
path: root/src/dotnet-library/scala/reflect/BeanProperty.scala
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-02-07 09:06:25 +0000
committermihaylov <mihaylov@epfl.ch>2007-02-07 09:06:25 +0000
commite3b42865333ed502b3e454c98eefbfc705e33d82 (patch)
tree68982d6051371b3731c6918e44cc0d9788b15e59 /src/dotnet-library/scala/reflect/BeanProperty.scala
parent108db60672ffa6a70617f51b166d8c751d7e65bb (diff)
downloadscala-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.scala34
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