News for hackers. Stuff that matters.
Re:Data Classes for Java by flukus on Wednesday November 01, 2017 @09:50PM (#15607199)
The same can be said for setters and getters with a backing field, you can access them through reflection. I can't remember how it works for properties with implicit backing fields but I thought they could be set via reflection as well?
Re:Data Classes for Java by kevingadd on Thursday November 02, 2017 @04:17PM (#15613871)
You can find the backing field and set it, yes, but the name is at least not predictable because the compiler mangles it (which discourages doing this because getting a grip on the field is harder)