Hi;

Has anyone worked with the AOP interceptors in Guice much?  I'm used
to using full blown AspectJ in my other projects and am having
difficulty reproducing some mix-in behaviour using plain AOP.

I want to introduce a tracer on instance methods in certain packages.
The catch is that I only want the logic applied to methods declared in
those packages.  That is, skip methods defined in parent classes that
reside outside of the target packages.

So say class A resides in org.library and class B that extends A
resides in my.project.  I want to only intercept methods defined in
my.project.B and not any inherited method from org.library.A.

Right now, I am using subpackageOf() as my class matcher and any() as
my method matcher in my bind interceptor declaration.  This doesn't do
what I want, it will apply to all methods in the subpackage, even
inherited methods from classes outside the packages I state.

Does anyone have any ideas on how to do this with a custom method
matcher?  And if it can't be done statically, what about during
runtime in the actual interceptor?

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

Reply via email to