Tóth István Zoltán
10/06/2023, 7:46 AMArtem Kobzar
10/06/2023, 2:28 PMOliver.O
10/07/2023, 2:43 PMOliver.O
10/07/2023, 2:56 PMTóth István Zoltán
10/10/2023, 6:22 AMArtem Kobzar
10/10/2023, 9:36 AMOliver.O
10/10/2023, 9:48 AMCLOVIS
10/10/2023, 9:53 AMpackage foo
interface A
class B : A
val a: A = B()
println(a::class.qualifiedName) // foo.A
on the JVM, it would print foo.B
CLOVIS
10/10/2023, 9:54 AMCLOVIS
10/10/2023, 9:56 AM::class.qualifiedName
is called? But that would probably break if an app tries to access the qualified name of a type from a library, which didn't use it itselfTóth István Zoltán
10/10/2023, 10:32 AMOliver.O
10/10/2023, 10:53 AM@Qualifiable
fun logger(@QualifiedClassName qualifiedName: String = "")
Tóth István Zoltán
10/10/2023, 11:04 AMinterface Qualifiable {
val qualifiedClassName : String get() = TODO()
}
Then the plugin overrides the field as below. It is not dynamic, it is the same as you would hardcode it manually. Not the best solution, but this is what I was able to reach with reasonable effort.
package a.b
class A : Qualifiable {
override val qualifiedClassName = "a.b.A"
}
Truth to be told, I'm not a big fan of annotations, especially on parameters.Oliver.O
10/10/2023, 11:08 AMTóth István Zoltán
10/10/2023, 12:31 PM