annotations with parameters

This commit is contained in:
Alex Tkachman
2012-03-12 16:52:49 +02:00
parent ae1138c4ba
commit c746a50406
3 changed files with 42 additions and 15 deletions
@@ -50,6 +50,7 @@ public class JetModifierList extends JetElement {
return findChildrenByType(JetNodeTypes.ANNOTATION);
}
@NotNull
public List<JetAnnotationEntry> getAnnotationEntries() {
List<JetAnnotationEntry> entries = findChildrenByType(JetNodeTypes.ANNOTATION_ENTRY);
List<JetAnnotationEntry> answer = entries.isEmpty() ? null : Lists.newArrayList(entries);
@@ -75,6 +75,7 @@ public class AnnotationResolver {
for (JetAnnotationEntry entryElement : annotationEntryElements) {
AnnotationDescriptor descriptor = new AnnotationDescriptor();
resolveAnnotationStub(scope, entryElement, descriptor, trace);
trace.record(BindingContext.ANNOTATION, entryElement, descriptor);
result.add(descriptor);
}
return result;