2008/11/25 Gili <[EMAIL PROTECTED]>

>
> Johan Haleby brought up an interesting approach to proxing classes
> without the limitations introduced by ASM/CGLIB such as:
>
> - requiring no-op constructors
> - preventing the use of final or private methods
> - losing annotations on the original class
>
> I would love to get your opinion on it because frankly if we can get
> rid of these limitations I would be *that* much happier :) Take a
> look:
> http://groups.google.com/group/mockito/browse_thread/thread/2a85cace251eb92c
>

FWIW, I wouldn't call this a proxy per se - this is bytecode manipulation
which requires access to the original bytes (it uses javassist to do this)
and only works on non-interface classes... but you can easily fall back
to using standard proxies for interfaces - downside is you end up with
two approaches to maintain

however I would be wary of calling this a 'silver' bullet because there are
several limitations wrt. bytecode manipulation (security notwithstanding)
- for example, I don't know if javassist works with custom classloaders as
used in EJB containers (and OSGi, etc.) where the original class bytes
may not be available, or where the original class may already be in-use
elsewhere in the JVM

just warning we may be jumping from known issues into the unknown ;)

Gili
> >
>


-- 
Cheers, Stuart

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to