summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-11-19 13:44:15 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-11-19 13:44:15 +0000
commit1e1c87c234826279a58c97bc5124f2e76ab58dce (patch)
tree695573d62d174feb76c017ad04875e2e8404f5cc /src/library
parent055190a38ba1496821b2b67c368c97e33573883a (diff)
downloadscala-1e1c87c234826279a58c97bc5124f2e76ab58dce.tar.gz
scala-1e1c87c234826279a58c97bc5124f2e76ab58dce.tar.bz2
scala-1e1c87c234826279a58c97bc5124f2e76ab58dce.zip
closes #2670.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/annotation/target/beanGetter.scala12
-rw-r--r--src/library/scala/annotation/target/beanSetter.scala12
-rw-r--r--src/library/scala/annotation/target/field.scala12
-rw-r--r--src/library/scala/annotation/target/getter.scala12
-rw-r--r--src/library/scala/annotation/target/setter.scala12
-rw-r--r--src/library/scala/deprecated.scala3
6 files changed, 53 insertions, 10 deletions
diff --git a/src/library/scala/annotation/target/beanGetter.scala b/src/library/scala/annotation/target/beanGetter.scala
index cc39a32874..8518049f2c 100644
--- a/src/library/scala/annotation/target/beanGetter.scala
+++ b/src/library/scala/annotation/target/beanGetter.scala
@@ -14,8 +14,8 @@ package scala.annotation.target
* used to control to which of the above members the annotations on
* the field are copied. By default, field annotations are only added
* to the actual field, but not to any of the accessors. By annotating
- * the annotation type with one or several of the meta-annotations this
- * behavior can be changed.
+ * the annotation type or the annotation class with one or several of
+ * the meta-annotations this behavior can be changed.
*
* In the following example, the annotation {{{@Id}}} will be added
* only to the bean getter {{{getX}}}. In order to annotate the field
@@ -39,5 +39,13 @@ package scala.annotation.target
* @Id @BeanProperty val x = 0
* }
* }}}
+ *
+ * For annotations defined in Scala, a default target can be specified
+ * in the annotation class itself, for example
+ *
+ * {{{
+ * @getter
+ * class myAnnotation extends Annotation
+ * }}}
*/
final class beanGetter extends StaticAnnotation
diff --git a/src/library/scala/annotation/target/beanSetter.scala b/src/library/scala/annotation/target/beanSetter.scala
index 5f1513fd51..a5df4c933f 100644
--- a/src/library/scala/annotation/target/beanSetter.scala
+++ b/src/library/scala/annotation/target/beanSetter.scala
@@ -14,8 +14,8 @@ package scala.annotation.target
* used to control to which of the above members the annotations on
* the field are copied. By default, field annotations are only added
* to the actual field, but not to any of the accessors. By annotating
- * the annotation type with one or several of the meta-annotations this
- * behavior can be changed.
+ * the annotation type or the annotation class with one or several of
+ * the meta-annotations this behavior can be changed.
*
* In the following example, the annotation {{{@Id}}} will be added
* only to the bean getter {{{getX}}}. In order to annotate the field
@@ -39,5 +39,13 @@ package scala.annotation.target
* @Id @BeanProperty val x = 0
* }
* }}}
+ *
+ * For annotations defined in Scala, a default target can be specified
+ * in the annotation class itself, for example
+ *
+ * {{{
+ * @getter
+ * class myAnnotation extends Annotation
+ * }}}
*/
final class beanSetter extends StaticAnnotation
diff --git a/src/library/scala/annotation/target/field.scala b/src/library/scala/annotation/target/field.scala
index 19533c6908..c202d276cc 100644
--- a/src/library/scala/annotation/target/field.scala
+++ b/src/library/scala/annotation/target/field.scala
@@ -14,8 +14,8 @@ package scala.annotation.target
* used to control to which of the above members the annotations on
* the field are copied. By default, field annotations are only added
* to the actual field, but not to any of the accessors. By annotating
- * the annotation type with one or several of the meta-annotations this
- * behavior can be changed.
+ * the annotation type or the annotation class with one or several of
+ * the meta-annotations this behavior can be changed.
*
* In the following example, the annotation {{{@Id}}} will be added
* only to the bean getter {{{getX}}}. In order to annotate the field
@@ -39,5 +39,13 @@ package scala.annotation.target
* @Id @BeanProperty val x = 0
* }
* }}}
+ *
+ * For annotations defined in Scala, a default target can be specified
+ * in the annotation class itself, for example
+ *
+ * {{{
+ * @getter
+ * class myAnnotation extends Annotation
+ * }}}
*/
final class field extends StaticAnnotation
diff --git a/src/library/scala/annotation/target/getter.scala b/src/library/scala/annotation/target/getter.scala
index 45e2a8ac4b..02c372fe2e 100644
--- a/src/library/scala/annotation/target/getter.scala
+++ b/src/library/scala/annotation/target/getter.scala
@@ -14,8 +14,8 @@ package scala.annotation.target
* used to control to which of the above members the annotations on
* the field are copied. By default, field annotations are only added
* to the actual field, but not to any of the accessors. By annotating
- * the annotation type with one or several of the meta-annotations this
- * behavior can be changed.
+ * the annotation type or the annotation class with one or several of
+ * the meta-annotations this behavior can be changed.
*
* In the following example, the annotation {{{@Id}}} will be added
* only to the bean getter {{{getX}}}. In order to annotate the field
@@ -39,5 +39,13 @@ package scala.annotation.target
* @Id @BeanProperty val x = 0
* }
* }}}
+ *
+ * For annotations defined in Scala, a default target can be specified
+ * in the annotation class itself, for example
+ *
+ * {{{
+ * @getter
+ * class myAnnotation extends Annotation
+ * }}}
*/
final class getter extends StaticAnnotation
diff --git a/src/library/scala/annotation/target/setter.scala b/src/library/scala/annotation/target/setter.scala
index 6f270a6116..b4d09263b4 100644
--- a/src/library/scala/annotation/target/setter.scala
+++ b/src/library/scala/annotation/target/setter.scala
@@ -14,8 +14,8 @@ package scala.annotation.target
* used to control to which of the above members the annotations on
* the field are copied. By default, field annotations are only added
* to the actual field, but not to any of the accessors. By annotating
- * the annotation type with one or several of the meta-annotations this
- * behavior can be changed.
+ * the annotation type or the annotation class with one or several of
+ * the meta-annotations this behavior can be changed.
*
* In the following example, the annotation {{{@Id}}} will be added
* only to the bean getter {{{getX}}}. In order to annotate the field
@@ -39,5 +39,13 @@ package scala.annotation.target
* @Id @BeanProperty val x = 0
* }
* }}}
+ *
+ * For annotations defined in Scala, a default target can be specified
+ * in the annotation class itself, for example
+ *
+ * {{{
+ * @getter
+ * class myAnnotation extends Annotation
+ * }}}
*/
final class setter extends StaticAnnotation
diff --git a/src/library/scala/deprecated.scala b/src/library/scala/deprecated.scala
index 1a176d1bc2..0b10b1ab74 100644
--- a/src/library/scala/deprecated.scala
+++ b/src/library/scala/deprecated.scala
@@ -11,12 +11,15 @@
package scala
+import annotation.target._
+
/**
* An annotation that designates the definition to which it is applied as deprecated.
* Access to the member then generates a deprecated warning.
*
* @since 2.3
*/
+@getter @setter @beanGetter @beanSetter
class deprecated(message: String) extends StaticAnnotation {
def this() = this("")
}