[FIR] Rename JvmNames -> JvmStandardClassIds
This is more consistent with the code of the common compiler checkers. It would be nice to refactor the contents of this object further, but it's out of scope of the current branch. ^KT-54596
This commit is contained in:
committed by
Space Team
parent
986f1624ec
commit
ec9cb8beb6
+3
-3
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.load.java.JvmAbi
|
||||
import org.jetbrains.kotlin.load.java.propertyNameByGetMethodName
|
||||
import org.jetbrains.kotlin.load.java.propertyNamesBySetMethodName
|
||||
import org.jetbrains.kotlin.load.kotlin.MemberSignature
|
||||
import org.jetbrains.kotlin.name.JvmNames
|
||||
import org.jetbrains.kotlin.name.JvmStandardClassIds
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
@@ -132,7 +132,7 @@ abstract class KotlinDeclarationInCompiledFileSearcher {
|
||||
private fun getJvmName(declaration: KtDeclaration?): String? {
|
||||
if (declaration == null) return null
|
||||
val annotationEntry = declaration.annotationEntries.firstOrNull {
|
||||
it.calleeExpression?.constructorReferenceExpression?.getReferencedName() == JvmNames.JVM_NAME_SHORT
|
||||
it.calleeExpression?.constructorReferenceExpression?.getReferencedName() == JvmStandardClassIds.JVM_NAME_SHORT
|
||||
}
|
||||
if (annotationEntry != null) {
|
||||
val constantValue = (annotationEntry.stub as? KotlinAnnotationEntryStubImpl)?.valueArguments?.get(Name.identifier("name"))
|
||||
@@ -176,7 +176,7 @@ abstract class KotlinDeclarationInCompiledFileSearcher {
|
||||
val parametersCount = memberParametersCount - (if (ktNamedFunction.isSuspendFunction(memberParameterList)) 1 else 0)
|
||||
val isJvmOverloads = ktNamedFunction.annotationEntries.any {
|
||||
it.calleeExpression?.constructorReferenceExpression?.getReferencedName() ==
|
||||
JvmNames.JVM_OVERLOADS_FQ_NAME.shortName().asString()
|
||||
JvmStandardClassIds.JVM_OVERLOADS_FQ_NAME.shortName().asString()
|
||||
}
|
||||
val firstDefaultParametersToPass = if (isJvmOverloads) {
|
||||
val totalNumberOfParametersWithDefaultValues = valueParameters.filter { it.hasDefaultValue() }.size
|
||||
|
||||
Reference in New Issue
Block a user