For example, here is a Java class
public class Thing {
...
public int thing;
public int getThing() { return thing; }
public void setThing(int t) { thing = t; }
}
In Kotlin, if I want to access thing
, I would do the following:
val t = Thing()
t.thing // get
t.thing = 42 //set
In the decompiled Kotlin bytecode, what I see is Kotlin using getter and setter:
t.getThing()
t.setThing(42)
I wonder if there is a way to directly access the field t.thing
instead of using getter and setter?