All Downloads are FREE. Search and download functionalities are using the official Maven repository.

name.remal.gradle_plugins.dsl.extensions.java.lang.reflect.Field.kt Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
package name.remal.gradle_plugins.dsl.extensions

import java.lang.reflect.Field
import java.lang.reflect.Modifier.FINAL

fun Field.makeNotFinal() = apply {
    val modifiersField = Field::class.java.getDeclaredField("modifiers")
    modifiersField.isAccessible = true
    modifiersField.setInt(this, modifiers and FINAL.inv())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy