This content has been marked as final.
Show 3 replies
-
1. Re: Can JavaAssist change a static final field?
chiba Jan 26, 2004 9:16 AM (in response to test_javaassist)"chiba" wrote:
Unfortunately, Javassist does not provide
a method for doing such a change.
Since it is possible in principle, I've append
this feature to my ToDo list.
Give me a few weeks. I'll do it as soon as
possible. -
2. Re: Can JavaAssist change a static final field?
thmauch Nov 16, 2012 8:51 AM (in response to chiba)I am also looking for the feature to change a static final field.
Is this now possible and how can I do it?
Thanks,
Thomas
-
3. Re: Can JavaAssist change a static final field?
chiba Nov 22, 2012 9:10 PM (in response to thmauch)According to my memory, changing the value of a static field is not straightforward because
javac may inline the value of static constant field at occurrences of that field even in different
class files. In that case, after compilation, Javassist cannot see where the original value is
embedded in class files and have to be modified.