Remove NameResolver#getFqName, replace with getClassId
This commit is contained in:
-4
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.serialization.deserialization;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.kotlin.name.ClassId;
|
||||
import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
|
||||
public interface NameResolver {
|
||||
@@ -30,7 +29,4 @@ public interface NameResolver {
|
||||
|
||||
@NotNull
|
||||
ClassId getClassId(int index);
|
||||
|
||||
@NotNull
|
||||
FqName getFqName(int index);
|
||||
}
|
||||
|
||||
+1
-12
@@ -45,7 +45,7 @@ public class NameResolverImpl implements NameResolver {
|
||||
private final ProtoBuf.StringTable strings;
|
||||
private final ProtoBuf.QualifiedNameTable qualifiedNames;
|
||||
|
||||
public NameResolverImpl(
|
||||
private NameResolverImpl(
|
||||
@NotNull ProtoBuf.StringTable strings,
|
||||
@NotNull ProtoBuf.QualifiedNameTable qualifiedNames
|
||||
) {
|
||||
@@ -93,15 +93,4 @@ public class NameResolverImpl implements NameResolver {
|
||||
|
||||
return new ClassId(FqName.fromSegments(packageFqName), FqName.fromSegments(relativeClassName), local);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public FqName getFqName(int index) {
|
||||
QualifiedName qualifiedName = qualifiedNames.getQualifiedName(index);
|
||||
Name shortName = getName(qualifiedName.getShortName());
|
||||
if (!qualifiedName.hasParentQualifiedName()) {
|
||||
return FqName.topLevel(shortName);
|
||||
}
|
||||
return getFqName(qualifiedName.getParentQualifiedName()).child(shortName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user