Status: New
Owner: ----

New issue 416 by [email protected]: Method interception on non-guice  
created objects
http://code.google.com/p/google-guice/issues/detail?id=416

Could it be possible to add the method interception functionality on non
Guice-created objects ?

I know this is not the primary goal of Guice, but it could be interesting
in the way that Guice can inject non Guice-created objects (with method
injectMembers), therefore we keep a parallel.

Here is how I see it:

new method: public <T> T Injector.intercept(T obj, MethodInterceptor...
interceptors);

1. intercept would check the class of obj then check in the interceptors
list if one matches
2. intercept would check if the class is valid according to limitations
3. intercept would create a new subclass of obj's class (if needed), like
it is currently done, with the delegate pattern in mind.
4. intercept would add optional interceptors given as parameters.
5. intercept returns a new instance of the newly created class, and
provides it with obj (if using the delegate pattern).

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to