If you compile your code using ajc or javac with -g (for binary weaving purpose), you will get the original argument names. -Ramnivas
On Fri, Nov 14, 2008 at 8:19 AM, rmahmood <[EMAIL PROTECTED]> wrote: > > But this will give the argument names as saved in .class file, normally > arg0, > arg1 etc. > not the original names as in source code. > > Is there any way to get original names as specified in source code? > > > Ramnivas Laddad wrote: > > > > You get get the associated CodeSignature object as follows: > > CodeSignature codeSignature = (CodedSignature) > > thisJoinPoint.getSignature(); > > String[] argNames = codeSignature.getParameterNames(); > > > > -Ramnivas > > > > On Wed, Nov 12, 2008 at 10:48 PM, Owen Corpening > > <[EMAIL PROTECTED]>wrote: > > > >> I am using a tracing aspect and it is printing the method arg values > upon > >> entry, but without arg names: > >> trace enter: int com.AjlibTest.DummyObject.someMethod(int) , this: > >> [EMAIL PROTECTED], args: arg 0 = 5 > >> > >> using joinPoint.getArgs() - I can see in the debugger that the arg names > >> are not in the joinpoint - is there a way an aspect can capture that > >> info? > >> > >> Owen Corpening > >> 10911 Watchful Fox Drive > >> Austin, TX 78748 > >> > >> 512 280-1753 Home > >> 512 634-5148 Office > >> 512 659-5300 Cell > >> > >> > >> _______________________________________________ > >> aspectj-users mailing list > >> [email protected] > >> https://dev.eclipse.org/mailman/listinfo/aspectj-users > >> > >> > > > > _______________________________________________ > > aspectj-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > > > > -- > View this message in context: > http://www.nabble.com/can-arg-names-be-accessed-at-a-joinpoint--tp20474387p20500385.html > Sent from the AspectJ - users mailing list archive at Nabble.com. > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users >
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
