This is actually a deficiency in the Binder API right now -- interceptors match based on Class (and Method), not Key. I looked into this a while ago when someone asked a similar question internally, and there didn't seem to be any reason within the implementation that it was limited to Class (as opposed to Key), but changing it to Key would be a clunky API change (it would require an additional method name... it can't be an overloaded method because the limitation on Class is in the generics, and the generic types would clash).
sam On Wed, Sep 22, 2010 at 9:45 PM, Dhanji R. Prasanna <[email protected]>wrote: > The simple way to do it would be to bind the class to two different keys: > one which gets intercepted and one that doesn't. > > Dhanji. > > > On Wed, Sep 22, 2010 at 7:37 AM, Andrei Pozolotin < > [email protected]> wrote: > >> Hello; >> >> SITUATOIN: >> >> when I use guice aop interceptor for a class: >> >> class Base { void call() {} } >> >> the guice aop will use cglib to produce a proxy derived class, such >> as: >> >> class Base&&EnhancerByGuice$$12345678 extends Base { void call() {} } >> >> PROBLEM: >> >> how can I call original Base.call() method and NOT EnhancerByGuice? >> >> in the spirit of invokeSuper(): >> >> http://cglib.sourceforge.net/apidocs/net/sf/cglib/MethodProxy.html#invokeSuper%28java.lang.Object,%20java.lang.Object[]%29 >> >> Thank you; >> >> Andrei >> >> -- >> 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]<google-guice%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-guice?hl=en. >> >> > -- > 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]<google-guice%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > -- 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.
