Drop KtLightClass#getFqName() and some usages of classFqName in KtLightClassForDecompiledDeclaration

This commit is contained in:
Pavel V. Talanov
2016-07-26 16:37:29 +03:00
parent 1fda24fbbf
commit 5a1a1fc03a
10 changed files with 24 additions and 28 deletions
@@ -80,7 +80,7 @@ private fun Converter.convertImport(fqName: FqName, ref: PsiJavaCodeReferenceEle
private fun Converter.convertStaticImportOnDemand(fqName: FqName, target: PsiElement?): List<String> {
when (target) {
is KtLightClassForFacade -> return listOf(target.getFqName().parent().render() + ".*")
is KtLightClassForFacade -> return listOf(target.fqName.parent().render() + ".*")
is KtLightClass -> {
val kotlinOrigin = target.kotlinOrigin
@@ -140,7 +140,7 @@ private fun convertStaticExplicitImport(fqName: FqName, target: PsiElement?): Li
private fun convertNonStaticImport(fqName: FqName, isOnDemand: Boolean, target: PsiElement?): List<String> {
when (target) {
is KtLightClassForFacade -> return listOf(target.getFqName().parent().render() + ".*")
is KtLightClassForFacade -> return listOf(target.fqName.parent().render() + ".*")
is KtLightClass -> {
if (!isOnDemand) {
@@ -161,4 +161,4 @@ private val DEFAULT_IMPORTS_SET: Set<FqName> = JvmPlatform.defaultModuleParamete
.map { it.fqnPart() }
.toSet()
private fun isImportedByDefault(c: KtLightClass) = c.getFqName().parent() in DEFAULT_IMPORTS_SET
private fun isImportedByDefault(c: KtLightClass) = c.qualifiedName?.let { FqName(it).parent() } in DEFAULT_IMPORTS_SET