diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-09-29 19:00:05 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-09-29 19:00:05 +0000 |
commit | 0d724fbb3e193b46fef840d12258eab26ed206f2 (patch) | |
tree | 80ead17bfb5369212d90b78682145256cac1edc0 /test/files/jvm/annotations.scala | |
parent | 2a91d630e70d1c9ff349d7e57d7e084780cf11fb (diff) | |
download | scala-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.scala | 11 |
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 } } |