byte-buddy
byte-buddy copied to clipboard
question: is it possible to set non-static final field with byte buddy?
If someone extends a class which contains final fields, obviously some constructor in the class sets the final fields. Now the subclass (to be defined by byte buddy) wants to change the final fields, is this possible with byte buddy? If so, how? Thanks.
No, Byte Buddy can only do what is possible in Java byte code and that's not possible.
What you can do is that you'd change the original class to set the field differently.