Hi,
I desperately need help on this. I've have been looking all over for a way to do this.
I am trying to use a @Before advice to print the names and values of the actual arguments of method pointcuts.
First I thought simply compiling the class files with the -g option will do the trick. That didn't work.
Then I read in a post somewhere that using AspectJ load-time weaving will for sure do the trick. So I did the following for Tomcat 7:
In my context.xml
In my config.xmlCode:... <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/> ...
But still when I call MethodSignature.getParameterNames() it returns null.Code:... <context:load-time-weaver weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/> ...
So my question is:
Is there a way to get the parameter names of a method from within an advice? If so how?


Reply With Quote