summaryrefslogtreecommitdiff
path: root/test/files/jvm/annotations.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-09-29 19:00:05 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-09-29 19:00:05 +0000
commit0d724fbb3e193b46fef840d12258eab26ed206f2 (patch)
tree80ead17bfb5369212d90b78682145256cac1edc0 /test/files/jvm/annotations.scala
parent2a91d630e70d1c9ff349d7e57d7e084780cf11fb (diff)
downloadscala-0d724fbb3e193b46fef840d12258eab26ed206f2.tar.gz
scala-0d724fbb3e193b46fef840d12258eab26ed206f2.tar.bz2
scala-0d724fbb3e193b46fef840d12258eab26ed206f2.zip
improved annotations copying (documentation, mo...
improved annotations copying (documentation, moved meta-annotations, added tests)
Diffstat (limited to 'test/files/jvm/annotations.scala')
-rw-r--r--test/files/jvm/annotations.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/jvm/annotations.scala b/test/files/jvm/annotations.scala
index ec3841b958..902ea87a90 100644
--- a/test/files/jvm/annotations.scala
+++ b/test/files/jvm/annotations.scala
@@ -93,6 +93,15 @@ object Test4 {
def this() = this("")
}
class Foo8(@SourceAnnotation("constructor val") val n: Int) {}
+ class Foo9 {
+ import scala.annotation.target._
+ import scala.reflect.BeanProperty
+ @(SourceAnnotation @getter)("http://apple.com") val x = 0
+ @BeanProperty @(SourceAnnotation @beanSetter)("http://uppla.com") var y = 0
+
+ type myAnn = SourceAnnotation @beanGetter @field
+ @BeanProperty @myAnn("http://eppli.com") var z = 0
+ }
def run {
import java.lang.annotation.Annotation
import java.lang.reflect.AnnotatedElement
@@ -121,6 +130,8 @@ object Test4 {
classOf[Foo7].getDeclaredConstructors foreach printSourceAnnotations
classOf[Foo8].getDeclaredFields foreach printSourceAnnotations
classOf[Foo8].getDeclaredMethods foreach printSourceAnnotations
+ classOf[Foo9].getDeclaredFields foreach printSourceAnnotations
+ classOf[Foo9].getDeclaredMethods foreach printSourceAnnotations
}
}