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)
This commit is contained in:
+5
-1
@@ -56,7 +56,11 @@ public class AnnotationDescriptorLoader extends BaseDescriptorLoader implements
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> loadClassAnnotations(@NotNull ClassDescriptor descriptor, @NotNull ProtoBuf.Class classProto) {
|
||||
public List<AnnotationDescriptor> loadClassAnnotations(
|
||||
@NotNull ClassDescriptor descriptor,
|
||||
@NotNull ProtoBuf.Class classProto,
|
||||
@NotNull NameResolver nameResolver
|
||||
) {
|
||||
KotlinJvmBinaryClass kotlinClass = findKotlinClassByDescriptor(descriptor);
|
||||
if (kotlinClass == null) {
|
||||
// This means that the resource we're constructing the descriptor from is no longer present: KotlinClassFinder had found the
|
||||
|
||||
+10
-2
@@ -29,7 +29,11 @@ public interface AnnotationLoader {
|
||||
AnnotationLoader UNSUPPORTED = new AnnotationLoader() {
|
||||
@NotNull
|
||||
@Override
|
||||
public List<AnnotationDescriptor> loadClassAnnotations(@NotNull ClassDescriptor descriptor, @NotNull ProtoBuf.Class classProto) {
|
||||
public List<AnnotationDescriptor> loadClassAnnotations(
|
||||
@NotNull ClassDescriptor descriptor,
|
||||
@NotNull ProtoBuf.Class classProto,
|
||||
@NotNull NameResolver nameResolver
|
||||
) {
|
||||
return notSupported();
|
||||
}
|
||||
|
||||
@@ -63,7 +67,11 @@ public interface AnnotationLoader {
|
||||
};
|
||||
|
||||
@NotNull
|
||||
List<AnnotationDescriptor> loadClassAnnotations(@NotNull ClassDescriptor descriptor, @NotNull ProtoBuf.Class classProto);
|
||||
List<AnnotationDescriptor> loadClassAnnotations(
|
||||
@NotNull ClassDescriptor descriptor,
|
||||
@NotNull ProtoBuf.Class classProto,
|
||||
@NotNull NameResolver nameResolver
|
||||
);
|
||||
|
||||
@NotNull
|
||||
List<AnnotationDescriptor> loadCallableAnnotations(
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public class DeserializedClassDescriptor(
|
||||
Annotations.EMPTY
|
||||
}
|
||||
else DeserializedAnnotations(c.storageManager) {
|
||||
c.components.annotationLoader.loadClassAnnotations(this, classProto)
|
||||
c.components.annotationLoader.loadClassAnnotations(this, classProto, c.nameResolver)
|
||||
}
|
||||
|
||||
override fun getContainingDeclaration(): DeclarationDescriptor = containingDeclaration
|
||||
|
||||
Reference in New Issue
Block a user