Have a look at the following link: class file format and pay special attention to the access_flags member of the class description structure. If you'd mask (i.e. 'nand') away the ACC_FINAL (0x0010) bit, the class is assumed not to be final. If you 'or' in the ACC_PUBLIC (0x0001) bit, you've automagically turned it into a public class also. Don't tell anyone I told you, because I don't hack never. kind regards
Joined: Jul 28, 2002
Thanks, but how would this work at runtime? I don't want to change the rt.jat classes before runtime, because I want this to work with any VM and by just running my app (i.e. java myApp). So I can do runtime byte-code engineering, but if System's already defined by the bootstrap loader, can I grab that class def, "nand" the modifier, create a new class extending that, and actually have the VM accept that new class' definition?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Is it possible to extend a final class? (With byte code engineering or whatever)