Skip to content

Commit bf581b9

Browse files
committed
Rename willExtract properties to shouldExtract
1 parent 5a47e1d commit bf581b9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ open class KotlinFileExtractor(
901901
if (f.isInline) {
902902
addModifiers(id, "inline")
903903
}
904-
if (f.willExtractAsStatic) {
904+
if (f.shouldExtractAsStatic) {
905905
addModifiers(id, "static")
906906
}
907907
if (f is IrSimpleFunction && f.overriddenSymbols.isNotEmpty()) {
@@ -1479,7 +1479,7 @@ open class KotlinFileExtractor(
14791479

14801480
tw.writeCallableBinding(id, methodId)
14811481

1482-
if (callTarget.willExtractAsStatic) {
1482+
if (callTarget.shouldExtractAsStatic) {
14831483
extractStaticTypeAccessQualifier(callTarget, id, locId, enclosingCallable, enclosingStmt)
14841484
} else if (extractDispatchReceiver != null) {
14851485
extractDispatchReceiver(id)
@@ -1502,24 +1502,24 @@ open class KotlinFileExtractor(
15021502
}
15031503

15041504
private fun extractStaticTypeAccessQualifier(target: IrDeclaration, parentExpr: Label<out DbExprparent>, locId: Label<DbLocation>, enclosingCallable: Label<out DbCallable>, enclosingStmt: Label<out DbStmt>) {
1505-
if (target.willExtractAsStaticMemberOfClass) {
1505+
if (target.shouldExtractAsStaticMemberOfClass) {
15061506
extractTypeAccessRecursive(target.parentAsClass.toRawType(), locId, parentExpr, -1, enclosingCallable, enclosingStmt)
1507-
} else if (target.willExtractAsStaticMemberOfFile) {
1507+
} else if (target.shouldExtractAsStaticMemberOfFile) {
15081508
extractTypeAccess(useFileClassType(target.parent as IrFile), locId, parentExpr, -1, enclosingCallable, enclosingStmt)
15091509
}
15101510
}
15111511

1512-
private val IrDeclaration.willExtractAsStaticMemberOfClass: Boolean
1513-
get() = this.willExtractAsStatic && parent is IrClass
1512+
private val IrDeclaration.shouldExtractAsStaticMemberOfClass: Boolean
1513+
get() = this.shouldExtractAsStatic && parent is IrClass
15141514

1515-
private val IrDeclaration.willExtractAsStaticMemberOfFile: Boolean
1516-
get() = this.willExtractAsStatic && parent is IrFile
1515+
private val IrDeclaration.shouldExtractAsStaticMemberOfFile: Boolean
1516+
get() = this.shouldExtractAsStatic && parent is IrFile
15171517

15181518
private fun isStaticAnnotatedNonCompanionMember(f: IrSimpleFunction) =
15191519
f.parentClassOrNull?.isNonCompanionObject == true &&
15201520
(f.hasAnnotation(jvmStaticFqName) || f.correspondingPropertySymbol?.owner?.hasAnnotation(jvmStaticFqName) == true)
15211521

1522-
private val IrDeclaration.willExtractAsStatic: Boolean
1522+
private val IrDeclaration.shouldExtractAsStatic: Boolean
15231523
get() = this is IrSimpleFunction && (isStaticFunction(this) || isStaticAnnotatedNonCompanionMember(this)) ||
15241524
this is IrField && this.isStatic ||
15251525
this is IrEnumEntry
@@ -3063,7 +3063,7 @@ open class KotlinFileExtractor(
30633063
val locId = tw.getLocation(e)
30643064
val type = useType(e.type)
30653065

3066-
if (containingDeclaration.willExtractAsStatic && containingDeclaration.parentClassOrNull?.isNonCompanionObject == true) {
3066+
if (containingDeclaration.shouldExtractAsStatic && containingDeclaration.parentClassOrNull?.isNonCompanionObject == true) {
30673067
// Use of `this` in a non-companion object member that will be lowered to a static function -- replace with a reference
30683068
// to the corresponding static object instance.
30693069
val instanceField = useObjectClassInstance(containingDeclaration.parentAsClass)

0 commit comments

Comments
 (0)