geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nokleberg <ch...@sixlegs.com>
Subject Re: [bcel] Is anyone a BCEL expert?
Date Mon, 25 Aug 2003 05:51:49 GMT
Hi,

I see someone already mentioned CGLIB, but thought I'd throw in my two
cents anyway.

Dain Sundstrom wrote:
> Interface proxy generator -- This is a copy of java.reflection.Proxy.  
> Why do we need a copy?  Well I think it is a good starting point for 
> the rest of the stuff, and I know we can do it better.  I would like 
> the proxy generator to be able to generate class names that have some 
> meaning other then Proxy$24, and I think we can write code that this 
> faster.

See net.sf.cglib.Enhancer. It is a very useful general tool, but for
performance sometimes it is better to use something more tailored to
your specific need.

> Dynamic instance factory

See net.sf.cglib.ConstructorProxy, it can do exactly what you describe
(but without the argument restriction).

> Abstract class proxy generator -- We need this for the CMP 2.x 
> implementation. 

The Enhancer will handle this use case.

> Field interception -- This will make CMP 1.x much easier to implement.  

This will require a different technique as it requires hooking into the
ClassLoader. It probably is possible to add the necessary hooks to
CGLIB, but IMO it is not the right tool for this particular task.

Chris



Mime
View raw message