From 0d724fbb3e193b46fef840d12258eab26ed206f2 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 29 Sep 2009 19:00:05 +0000 Subject: improved annotations copying (documentation, mo... improved annotations copying (documentation, moved meta-annotations, added tests) --- test/files/jvm/annotations.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/files/jvm/annotations.scala') 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 } } -- cgit v1.2.3