Hi,
just wondering if anyone did some nice code which
uses the sun.reflect.ClassFileAssembler
and sun.reflect.AccessGenerator
BTW: Sun left a spelling error in that ClassFileAssembler
class: emitBoxingContantPoolEntries
Cheers
Marc
www.illegalaccess.org
Jon Skeet - 18 Jul 2003 11:34 GMT
Marc Sch?nefeld <marc@beauchamp.de> wrote:
> just wondering if anyone did some nice code which
> uses the sun.reflect.ClassFileAssembler
> and sun.reflect.AccessGenerator
Hopefully not, given that Sun themselves say you shouldn't use classes
in the sun.* packages.
> BTW: Sun left a spelling error in that ClassFileAssembler
> class: emitBoxingContantPoolEntries
Just another reason to avoid using classes you're not supposed to in
the first place.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Matthias Ernst - 02 Aug 2003 09:32 GMT
> Hi,
>
> just wondering if anyone did some nice code which
> uses the sun.reflect.ClassFileAssembler
> and sun.reflect.AccessGenerator
There's alternative free packages around. Most popular seems BCEL, I
have also played with ASM (http://asm.objectweb.org/) which seems more
lightweight. Implementing something similar to C#'s whatstheirnames
(delegates?), i.e. turning an (object, methodname) into an
implementation of Runnable was very straightforward.
Next project will be dynamic proxies that can additionally specify a
superclass.
Matthias