What's The Matter With You
Looking at and modifying classes as they're loaded
A few years ago while editing ONJava, we published a number of articles on fairly exotic techniques -- mostly involving bytecode manipulation and aspect-oriented programming -- to modify and transform existing Java code. There were plausible use cases, but to pull these things off, you often had to use a different virtual machine for AOP, or do some spectactularly heavy lifting for bytecode manipulation. Each approach had its adherents, but both remained pretty fringey, surely due in part to the non-standard, high-difficulty details of using them.
So, if there were something built into Java SE that allowed you to inspect and modify existing classes, without recompilation and without having to wrangle JVM opcodes yourself, would that be worth further investigation? Well...
In our Feature Article, Thorbj