summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-06-11 11:07:36 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-06-11 11:07:36 +0000
commitc762ae353b9ff8beec6ed9516b70134e1f04534d (patch)
tree943b68a997b25e8b4004c18997b75925764706f2 /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
parent9e8835d617f1176290ad83691146af1f14f6faff (diff)
downloadscala-c762ae353b9ff8beec6ed9516b70134e1f04534d.tar.gz
scala-c762ae353b9ff8beec6ed9516b70134e1f04534d.tar.bz2
scala-c762ae353b9ff8beec6ed9516b70134e1f04534d.zip
more annotations cleanup.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index ca35798de4..8c49e68c25 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -764,35 +764,35 @@ abstract class ClassfileParser {
}
}
- def parseAnnotationArgument: Option[ConstantAnnotationArgument] = {
+ def parseAnnotArg: Option[ClassfileAnnotArg] = {
val tag = in.nextByte
val index = in.nextChar
tag match {
case STRING_TAG =>
- Some(LiteralAnnotationArgument(Constant(pool.getName(index).toString())))
+ Some(LiteralAnnotArg(Constant(pool.getName(index).toString())))
case BOOL_TAG | BYTE_TAG | CHAR_TAG | SHORT_TAG | INT_TAG |
LONG_TAG | FLOAT_TAG | DOUBLE_TAG =>
- Some(LiteralAnnotationArgument(pool.getConstant(index)))
+ Some(LiteralAnnotArg(pool.getConstant(index)))
case CLASS_TAG =>
- Some(LiteralAnnotationArgument(Constant(pool.getType(index))))
+ Some(LiteralAnnotArg(Constant(pool.getType(index))))
case ENUM_TAG =>
val t = pool.getType(index)
val n = pool.getName(in.nextChar)
val s = t.typeSymbol.linkedModuleOfClass.info.decls.lookup(n)
assert(s != NoSymbol, t)
- Some(LiteralAnnotationArgument(Constant(s)))
+ Some(LiteralAnnotArg(Constant(s)))
case ARRAY_TAG =>
- val arr = new ArrayBuffer[ConstantAnnotationArgument]()
+ val arr = new ArrayBuffer[ClassfileAnnotArg]()
var hasError = false
for (i <- 0 until index)
- parseAnnotationArgument match {
+ parseAnnotArg match {
case Some(c) => arr += c
case None => hasError = true
}
if (hasError) None
- else Some(ArrayAnnotationArgument(arr.toArray))
+ else Some(ArrayAnnotArg(arr.toArray))
case ANNOTATION_TAG =>
- parseAnnotation(index) map (NestedAnnotationArgument(_))
+ parseAnnotation(index) map (NestedAnnotArg(_))
}
}
@@ -802,11 +802,11 @@ abstract class ClassfileParser {
def parseAnnotation(attrNameIndex: Char): Option[AnnotationInfo] = try {
val attrType = pool.getType(attrNameIndex)
val nargs = in.nextChar
- val nvpairs = new ListBuffer[(Name,ConstantAnnotationArgument)]
+ val nvpairs = new ListBuffer[(Name, ClassfileAnnotArg)]
var hasError = false
for (i <- 0 until nargs) {
val name = pool.getName(in.nextChar)
- parseAnnotationArgument match {
+ parseAnnotArg match {
case Some(c) => nvpairs += ((name, c))
case None => hasError = true
}