That's correct. This is because Java does not provide virtual dispatch for private methods, it is not possible to intercept them. If you declare them at any other scope (package local, public or protected) it will work fine.
Dhanji. On Sun, Jun 20, 2010 at 2:57 PM, sandy <[email protected]> wrote: > I am using Guice with AOP alliance > There is a private method in my class and I have created an method > interceptor for it > but the control doesnt reaches to my interceptor.But when I changed > the accessifier from private to public it works > > Same is the case with accessing a class's private variable.I have to > define a getter for all the private fields of a class > > Just curios to know, Is this a limitation of Guice framework or there > is a work around for it > > -- > 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.
