Skip to content

Commit 8cb1c7f

Browse files
committed
Pass NameResolver to loadClassAnnotations()
It's not used at the moment, but will be in the upcoming implementation of annotation loader (for JS, built-ins and type annotations)
1 parent 19ad240 commit 8cb1c7f

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

core/descriptor.loader.java/src/org/jetbrains/jet/lang/resolve/kotlin/AnnotationDescriptorLoader.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ public AnnotationDescriptorLoader(
5656

5757
@NotNull
5858
@Override
59-
public List<AnnotationDescriptor> loadClassAnnotations(@NotNull ClassDescriptor descriptor, @NotNull ProtoBuf.Class classProto) {
59+
public List<AnnotationDescriptor> loadClassAnnotations(
60+
@NotNull ClassDescriptor descriptor,
61+
@NotNull ProtoBuf.Class classProto,
62+
@NotNull NameResolver nameResolver
63+
) {
6064
KotlinJvmBinaryClass kotlinClass = findKotlinClassByDescriptor(descriptor);
6165
if (kotlinClass == null) {
6266
// This means that the resource we're constructing the descriptor from is no longer present: KotlinClassFinder had found the

core/serialization/src/org/jetbrains/jet/descriptors/serialization/descriptors/AnnotationLoader.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ public interface AnnotationLoader {
2929
AnnotationLoader UNSUPPORTED = new AnnotationLoader() {
3030
@NotNull
3131
@Override
32-
public List<AnnotationDescriptor> loadClassAnnotations(@NotNull ClassDescriptor descriptor, @NotNull ProtoBuf.Class classProto) {
32+
public List<AnnotationDescriptor> loadClassAnnotations(
33+
@NotNull ClassDescriptor descriptor,
34+
@NotNull ProtoBuf.Class classProto,
35+
@NotNull NameResolver nameResolver
36+
) {
3337
return notSupported();
3438
}
3539

@@ -63,7 +67,11 @@ private List<AnnotationDescriptor> notSupported() {
6367
};
6468

6569
@NotNull
66-
List<AnnotationDescriptor> loadClassAnnotations(@NotNull ClassDescriptor descriptor, @NotNull ProtoBuf.Class classProto);
70+
List<AnnotationDescriptor> loadClassAnnotations(
71+
@NotNull ClassDescriptor descriptor,
72+
@NotNull ProtoBuf.Class classProto,
73+
@NotNull NameResolver nameResolver
74+
);
6775

6876
@NotNull
6977
List<AnnotationDescriptor> loadCallableAnnotations(

core/serialization/src/org/jetbrains/jet/descriptors/serialization/descriptors/DeserializedClassDescriptor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public class DeserializedClassDescriptor(
7070
Annotations.EMPTY
7171
}
7272
else DeserializedAnnotations(c.storageManager) {
73-
c.components.annotationLoader.loadClassAnnotations(this, classProto)
73+
c.components.annotationLoader.loadClassAnnotations(this, classProto, c.nameResolver)
7474
}
7575

7676
override fun getContainingDeclaration(): DeclarationDescriptor = containingDeclaration

0 commit comments

Comments
 (0)