diff options
author | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-05-28 20:49:06 +0400 |
---|---|---|
committer | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-05-28 20:49:06 +0400 |
commit | 4996a1613988c14bd2b7bbbee6adcb5c527e81d1 (patch) | |
tree | 12ae48002b595a34ebac624fdd7065c59b7573c3 | |
parent | 0a66fa892531a8f35dd2a9e08c857cf88a513a06 (diff) | |
download | fernflower-4996a1613988c14bd2b7bbbee6adcb5c527e81d1.tar fernflower-4996a1613988c14bd2b7bbbee6adcb5c527e81d1.tar.gz fernflower-4996a1613988c14bd2b7bbbee6adcb5c527e81d1.tar.lz fernflower-4996a1613988c14bd2b7bbbee6adcb5c527e81d1.tar.xz fernflower-4996a1613988c14bd2b7bbbee6adcb5c527e81d1.zip |
class literals in annotation attributes supported
-rw-r--r-- | src/de/fernflower/struct/attr/StructAnnotationAttribute.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/de/fernflower/struct/attr/StructAnnotationAttribute.java b/src/de/fernflower/struct/attr/StructAnnotationAttribute.java index 4d8f6bf..5458d0b 100644 --- a/src/de/fernflower/struct/attr/StructAnnotationAttribute.java +++ b/src/de/fernflower/struct/attr/StructAnnotationAttribute.java @@ -96,17 +96,34 @@ public class StructAnnotationAttribute extends StructGeneralAttribute { value = type.value; break; case CodeConstants.TYPE_BYTE: + value = byte.class.getName(); + break; case CodeConstants.TYPE_CHAR: + value = char.class.getName(); + break; case CodeConstants.TYPE_DOUBLE: + value = double.class.getName(); + break; case CodeConstants.TYPE_FLOAT: + value = float.class.getName(); + break; case CodeConstants.TYPE_INT: + value = int.class.getName(); + break; case CodeConstants.TYPE_LONG: + value = long.class.getName(); + break; case CodeConstants.TYPE_SHORT: + value = short.class.getName(); + break; case CodeConstants.TYPE_BOOLEAN: + value = boolean.class.getName(); + break; case CodeConstants.TYPE_VOID: - // FIXME: other classes if applicable, see attribute description + value = void.class.getName(); + break; default: - throw new RuntimeException("invalid class type!"); + throw new RuntimeException("invalid class type: " + type.type); } return new ConstExprent(VarType.VARTYPE_CLASS, value); case '[': // array |