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
@@ -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;