It is not specific to a particular bytecode generation framework and this is NOT a transformation, it is a class creation. If you are creating classes dynamically with any generation framework, you need a classloader to ClassLoader.defineClass. loadClass(String name, byte[] newClass) is a method that can be used by any bytecode generation framework to generate a new class. AOP Remoting needs this feature as some generated classes need to be visible through the ULR. These generated classes are also subclasses of existing classes and need to be cycled what the particular base class is cycled as well.

I don't see what the big deal is anyways.

Bill

Scott M Stark wrote:

So create a custom subclass of UnifiedClassLoader then. This is
introducing
a dependency into the UCL layer specific to a particular bytecode
generation framework and I don't want this in the UCL layer. Why can't
this all be hidden in the Translator.transform method for the Javassist
version of the Translator?

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx -----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill
Burke
Sent: Saturday, January 03, 2004 11:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-dev] What is the purpose of the Translatable
interfacein head?


Please don't.  What this method does is allows the Classloader to create
  a class from a stream of bytes.  If you are creating a class
dynamically via Javassist(or something else), you need to be able to
have this method on your classloader as defineClass is protected method.

What Javassist does by default is creates an internal ClassLoader that
extends ClassLoader so that a class can be dynamically created.

Bill

Scott M Stark wrote:

Ok, but I don't see why the Class loadClass(String name, byte[]
classfile) method
is needed as any class bytecode mods should be handled by the Transformer. The only usage I can find in head is in AOPClassPool.writeAsClass(String
classname)
which itself has no usages. I think this method should be dropped.



xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian Brock
Sent: Saturday, January 03, 2004 7:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-dev] What is the purpose of the Translatable interfacein head?


This was something I added to remove aop's direct dependency on the

UCL.


It allows aop to be used in standalone mode without jbossmx.

Regards,
Adrian



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to

sys admin.


Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



--
================
Bill Burke
Chief Architect
JBoss Group LLC.
================




------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development




------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development


-- ================ Bill Burke Chief Architect JBoss Group LLC. ================




------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to