1 year ago
#160612
Richard Hu
why a field named "$r8$clinit" was generated in an interface in its smali code?
I have an interface A.kt
like this in an Android app:
interface A {
fun f1(defaultValue: String): String
fun f2(defaultValue: Boolean): Boolean
private class B(context: Context) : A {
// ...
}
companion object {
operator fun invoke(context: Context): A = B(context)
const val Old = "old"
}
}
Then I check the smali code generated from it:
.class public interface abstract Lxx/xx/A;
.super Ljava/lang/Object;
.source "A.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lxx/xx/A$B;
}
.end annotation
# static fields
.field public static final synthetic $r8$clinit:I // <======== What does this field mean?
# virtual methods
.method public abstract f1(Ljava/lang/String;)Ljava/lang/String;
.end method
.method public abstract f2(Z)Z
.end method
I found a field named $r8$clinit
was generated in the smali code. I hope to know why this field is generated and what is the purpose of it?
android
dalvik
dex
smali
0 Answers
Your Answer