Renamed Name.getName() and FqName.getFqName() to asString()
This commit is contained in:
@@ -31,7 +31,7 @@ public class JetLightPackage extends PsiPackageImpl {
|
||||
private final GlobalSearchScope scope;
|
||||
|
||||
public JetLightPackage(PsiManager manager, FqName qualifiedName, GlobalSearchScope scope) {
|
||||
super(manager, qualifiedName.getFqName());
|
||||
super(manager, qualifiedName.asString());
|
||||
this.fqName = qualifiedName;
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
+2
-2
@@ -189,7 +189,7 @@ public class KotlinJavaFileStubProvider implements CachedValueProvider<PsiJavaFi
|
||||
private PsiJavaFileStub createJavaFileStub(@NotNull final FqName packageFqName, @NotNull VirtualFile virtualFile) {
|
||||
PsiManager manager = PsiManager.getInstance(project);
|
||||
|
||||
final PsiJavaFileStubImpl javaFileStub = new PsiJavaFileStubImpl(packageFqName.getFqName(), true);
|
||||
final PsiJavaFileStubImpl javaFileStub = new PsiJavaFileStubImpl(packageFqName.asString(), true);
|
||||
javaFileStub.setPsiFactory(new ClsWrapperStubPsiFactory());
|
||||
|
||||
ClsFileImpl fakeFile =
|
||||
@@ -203,7 +203,7 @@ public class KotlinJavaFileStubProvider implements CachedValueProvider<PsiJavaFi
|
||||
@NotNull
|
||||
@Override
|
||||
public String getPackageName() {
|
||||
return packageFqName.getFqName();
|
||||
return packageFqName.asString();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+5
-5
@@ -175,7 +175,7 @@ public class KotlinLightClassForExplicitDeclaration extends AbstractLightClass i
|
||||
@NotNull
|
||||
@Override
|
||||
public String getPackageName() {
|
||||
return JetPsiUtil.getFQName((JetFile) classOrObject.getContainingFile()).getFqName();
|
||||
return JetPsiUtil.getFQName((JetFile) classOrObject.getContainingFile()).asString();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -260,13 +260,13 @@ public class KotlinLightClassForExplicitDeclaration extends AbstractLightClass i
|
||||
@Nullable
|
||||
@Override
|
||||
public String getName() {
|
||||
return classFqName.shortName().getName();
|
||||
return classFqName.shortName().asString();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getQualifiedName() {
|
||||
return classFqName.getFqName();
|
||||
return classFqName.asString();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -339,7 +339,7 @@ public class KotlinLightClassForExplicitDeclaration extends AbstractLightClass i
|
||||
}
|
||||
|
||||
ClassDescriptor deprecatedAnnotation = KotlinBuiltIns.getInstance().getDeprecatedAnnotation();
|
||||
String deprecatedName = deprecatedAnnotation.getName().getName();
|
||||
String deprecatedName = deprecatedAnnotation.getName().asString();
|
||||
FqNameUnsafe deprecatedFqName = DescriptorUtils.getFQName(deprecatedAnnotation);
|
||||
|
||||
for (JetAnnotationEntry annotationEntry : jetModifierList.getAnnotationEntries()) {
|
||||
@@ -353,7 +353,7 @@ public class KotlinLightClassForExplicitDeclaration extends AbstractLightClass i
|
||||
if (fqName == null) continue;
|
||||
|
||||
if (deprecatedFqName.equals(fqName.toUnsafe())) return true;
|
||||
if (deprecatedName.equals(fqName.getFqName())) return true;
|
||||
if (deprecatedName.equals(fqName.asString())) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -84,13 +84,13 @@ public class KotlinLightClassForPackage extends KotlinLightClassForPackageBase i
|
||||
@Nullable
|
||||
@Override
|
||||
public String getName() {
|
||||
return packageClassFqName.shortName().getName();
|
||||
return packageClassFqName.shortName().asString();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getQualifiedName() {
|
||||
return packageClassFqName.getFqName();
|
||||
return packageClassFqName.asString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -99,7 +99,7 @@ public class LightClassUtil {
|
||||
|
||||
@Nullable
|
||||
/*package*/ static PsiClass findClass(@NotNull FqName fqn, @NotNull StubElement<?> stub) {
|
||||
if (stub instanceof PsiClassStub && Comparing.equal(fqn.getFqName(), ((PsiClassStub) stub).getQualifiedName())) {
|
||||
if (stub instanceof PsiClassStub && Comparing.equal(fqn.asString(), ((PsiClassStub) stub).getQualifiedName())) {
|
||||
return (PsiClass)stub.getPsi();
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public class LightClassUtil {
|
||||
if (jvmName != null) {
|
||||
Project project = declaration.getProject();
|
||||
|
||||
String fqName = jvmName.getFqName().getFqName();
|
||||
String fqName = jvmName.getFqName().asString();
|
||||
return JavaElementFinder.getInstance(project).findClass(fqName, GlobalSearchScope.allScope(project));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user