You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by "Irving, Dave" <Da...@logicacmg.com> on 2003/05/30 10:18:41 UTC

Loading generated classes

Hi all,

I use BCEL to generate stub classes at runtime (to allow generic framework
classes to wrap type-safe adapter classes).
Currently I use my own class loader to load the class using the bytes I
obtain from the ClassGen / JavaClass.
What Im wondering though is impact on interoperability with other
potentially custom class loaders already in place (had some problems using
generated classes with JUnits swing interface). Should I really just be
making the required (protected) methods of the Current class loader
accessible and then using them to load my class?

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Re: Loading generated classes

Posted by Juozas Baliuka <ba...@centras.lt>.
----- Original Message -----
From: "Irving, Dave" <Da...@logicacmg.com>
To: "'BCEL Users List'" <bc...@jakarta.apache.org>
Sent: Friday, May 30, 2003 10:18 AM
Subject: Loading generated classes


> Hi all,
>
> I use BCEL to generate stub classes at runtime (to allow generic framework
> classes to wrap type-safe adapter classes).
> Currently I use my own class loader to load the class using the bytes I
> obtain from the ClassGen / JavaClass.
> What Im wondering though is impact on interoperability with other
> potentially custom class loaders already in place (had some problems using
> generated classes with JUnits swing interface). Should I really just be
> making the required (protected) methods of the Current class loader
> accessible and then using them to load my class?

We use reflection to make "defineClass" accesible, I do not think there are
more workarounds.

>
> This e-mail and any attachment is for authorised use by the intended
recipient(s) only.  It may contain proprietary material, confidential
information and/or be subject to legal privilege.  It should not be copied,
disclosed to, retained or used by, any other party.  If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender.  Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org