You can intercept all but not private methods with cglib. The reason is that private methods are non-virtual.
You should note that your times will be polluted with your interceptor overhead. Afaik most of the profiles use java.lang.instrument and jvmti to get the job done. But that is another story. Cheers Alen On Jun 19, 3:32 am, thach <thachnngu...@gmail.com> wrote: > I'm trying to write a profiler that basically intercepts a method, do > a timing around it before executing it. As I was walking through the > code, the line > > Enhancer.getMethods(declaringClass, null, methods); > > in ProxyFactory returns a List of _public_ methods. What about non- > public methods? There's no way to intercept (so I can profile) them? > > Any pointer is appreciated. > > Thanks, > Thach --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---