summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api/Annotations.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-14 16:04:02 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-15 00:55:45 +0200
commit4767fc21c6f9c8266ba98505c6a5ea2c95107e65 (patch)
treee47c4da5657739fec126ce6ff5c79cb07de2abcb /src/reflect/scala/reflect/api/Annotations.scala
parent210f8c8f108aaf650a5be640c4db0d2336193f33 (diff)
downloadscala-4767fc21c6f9c8266ba98505c6a5ea2c95107e65.tar.gz
scala-4767fc21c6f9c8266ba98505c6a5ea2c95107e65.tar.bz2
scala-4767fc21c6f9c8266ba98505c6a5ea2c95107e65.zip
SI-6360 revises naming of AnnotationInfo and its members
Internal face of AnnotationInfos is bound by backward compatibility with compiler plugins and possibly SBT, but the public face can be shaped in whatever fashion we like. Hence I cleaned up the names: AnnotationInfo itself got renamed to just Annotation, AnnotArgs got renamed to just Arguments and so on.
Diffstat (limited to 'src/reflect/scala/reflect/api/Annotations.scala')
-rw-r--r--src/reflect/scala/reflect/api/Annotations.scala29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Annotations.scala b/src/reflect/scala/reflect/api/Annotations.scala
new file mode 100644
index 0000000000..43e95f9902
--- /dev/null
+++ b/src/reflect/scala/reflect/api/Annotations.scala
@@ -0,0 +1,29 @@
+package scala.reflect
+package api
+
+import scala.collection.immutable.ListMap
+
+trait Annotations extends base.Annotations { self: Universe =>
+
+ override type Annotation >: Null <: AnyRef with AnnotationApi
+ trait AnnotationApi {
+ def tpe: Type
+ def scalaArgs: List[Tree]
+ def javaArgs: ListMap[Name, JavaArgument]
+ }
+
+ override type LiteralArgument >: Null <: JavaArgument with LiteralArgumentApi
+ trait LiteralArgumentApi {
+ def value: Constant
+ }
+
+ override type ArrayArgument >: Null <: JavaArgument with ArrayArgumentApi
+ trait ArrayArgumentApi {
+ def args: Array[JavaArgument]
+ }
+
+ override type NestedArgument >: Null <: JavaArgument with NestedArgumentApi
+ trait NestedArgumentApi {
+ def annotation: Annotation
+ }
+} \ No newline at end of file