I'm a Java and SQL enthusiast developer working for Adobe Systems in Basel, Switzerland. I'm the creator of jOOQ, a comprehensive SQL library for Java, and I'm blogging mostly about these three topics: Java, SQL and jOOQ Lukas is a DZone MVB and is not an employee of DZone and has posted 75 posts at DZone. You can read more from them at their website. View Full User Profile

A Dirt-ugly Hack to Modify Private Final Fields in Java

02.04.2013
| 2020 views |
  • submit to reddit

We all use reflection from time to time. We may even tamper with visibility through Java’s Field.setAccessible() and similar methods. But this post here takes things to the extreme and shows how to modify private (static) final fields in Java. Think twice, when choosing this tool ;-)

http://zarnekow.blogspot.ch/2013/01/java-hacks-changing-final-fields.html

 

Published at DZone with permission of Lukas Eder, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)