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:
@@ -48,10 +48,10 @@ public final class AnnotationsUtils {
|
||||
AnnotationDescriptor annotationDescriptor = getAnnotationByName(declarationDescriptor, annotation);
|
||||
assert annotationDescriptor != null;
|
||||
//TODO: this is a quick fix for unsupported default args problem
|
||||
if (annotationDescriptor.getValueArguments().isEmpty()) {
|
||||
if (annotationDescriptor.getAllValueArguments().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
CompileTimeConstant<?> constant = annotationDescriptor.getValueArguments().iterator().next();
|
||||
CompileTimeConstant<?> constant = annotationDescriptor.getAllValueArguments().values().iterator().next();
|
||||
//TODO: this is a quick fix for unsupported default args problem
|
||||
if (constant == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user