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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user