extracted method mapPlatformClass(FqName)
This commit is contained in:
+11
-7
@@ -149,14 +149,8 @@ public class JavaToKotlinClassMap implements PlatformToKotlinClassMap {
|
||||
packagesWithMappedClasses.put(javaClassName.parent(), kotlinDescriptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Collection<ClassDescriptor> mapPlatformClass(@NotNull ClassDescriptor classDescriptor) {
|
||||
FqNameUnsafe className = DescriptorUtils.getFQName(classDescriptor);
|
||||
if (!className.isSafe()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
FqName fqName = className.toSafe();
|
||||
public Collection<ClassDescriptor> mapPlatformClass(@NotNull FqName fqName) {
|
||||
ClassDescriptor kotlinAnalog = classDescriptorMap.get(fqName);
|
||||
ClassDescriptor kotlinCovariantAnalog = classDescriptorMapForCovariantPositions.get(fqName);
|
||||
List<ClassDescriptor> descriptors = Lists.newArrayList();
|
||||
@@ -169,6 +163,16 @@ public class JavaToKotlinClassMap implements PlatformToKotlinClassMap {
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Collection<ClassDescriptor> mapPlatformClass(@NotNull ClassDescriptor classDescriptor) {
|
||||
FqNameUnsafe className = DescriptorUtils.getFQName(classDescriptor);
|
||||
if (!className.isSafe()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return mapPlatformClass(className.toSafe());
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Collection<ClassDescriptor> mapPlatformClassesInside(@NotNull DeclarationDescriptor containingDeclaration) {
|
||||
|
||||
Reference in New Issue
Block a user