Kotlin
JVM - 取消字段final/修改final字段
class Main { private const val METHOD_MH_ACCESSOR = 0x1 private var UNSAFE: Unsafe? = null init { var unsafe: Unsafe? = null try
Kotlin Flow Test
Start Code suspend fun main(args : Array<String>){ val flow = MutableSharedFlow<Int>() GlobalScope.launch { flow.collect {
Comparison performance testing between Pbandk and Kotlinx Protobuf
Introduction This article is a comparison of the performance of the serialization and deserialization of the same data using the Pbandk library and th
FakeLocation - 实现一个FakeLocation
原版FakeLocation限制重重,还要钱,接下来我们先讨论Fake Location的实现,如有错误请指出。(这是一篇随手记) FL的实现 将一个二进制so文件拷贝到/dev,然后杀死system_server,system_server会被重新拉起(小概率设备直接趋势重启),在完成注入syst
Kotlin - 泛型?还是泛型?
kotlin的泛型有in, out, where 。 概念 其中有3个概念,分别是协变,逆变,不变。 不变 我们这里有一段代码: class Box<T>(val value: T) suspend fun main() { val stringBox: Box<String> = Box