AnnotationDescriptor refactoring: contains map of ValueParameterDescriptor and CompileTimeConstant for valueArgument.

DescriptorUtils: add method to get a list of sorted value arguments from AnnotationDescriptor
This commit is contained in:
Natalia.Ukhorskaya
2012-08-29 12:55:00 +04:00
parent 04deb2dd2f
commit 92a782ce6c
7 changed files with 42 additions and 15 deletions
@@ -172,7 +172,7 @@ public abstract class AnnotationCodegen {
for (AnnotationDescriptor annotation : annotations) {
//noinspection ConstantConditions
if ("Intrinsic".equals(annotation.getType().getConstructor().getDeclarationDescriptor().getName().getName())) {
value = (String) annotation.getValueArguments().get(0).getValue();
value = (String) annotation.getAllValueArguments().values().iterator().next().getValue();
break;
}
}
@@ -227,7 +227,7 @@ public class IntrinsicMethods {
ClassifierDescriptor classifierDescriptor = annotation.getType().getConstructor().getDeclarationDescriptor();
assert classifierDescriptor != null;
if ("Intrinsic".equals(classifierDescriptor.getName().getName())) {
String value = (String) annotation.getValueArguments().get(0).getValue();
String value = (String) annotation.getAllValueArguments().values().iterator().next().getValue();
intrinsicMethod = namedMethods.get(value);
if (intrinsicMethod != null) {
break;