Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: re[aspectj-users] trieve method name from the joinPoint

I think you will want to use thisJoinPoint.getSignature().getName(). There is another object thisJoinPointEnclosingPart, but it won't give any new information as yours is a method execution join point.

-Ramnivas

On Fri, Mar 21, 2008 at 10:07 AM, joss33 <jonathan.clairembault@xxxxxxxxx> wrote:

Hi all,

Here is my code :

pointcut oneCachedCall(int x):
               execution(long *(int))
               && args(x);

long around(int x) : oneCachedCall(x) {
   System.out.println(theSurroundedMethod); // of course
theSurroundedMethod should be replaced by something else
   return proceed(x);
}

I wanted to know whether it is possible to retrieve the method, which will
be woven, from the "around's body" or not.

thanks in advance.
--
View this message in context: http://www.nabble.com/retrieve-method-name-from-the-joinPoint-tp16197930p16197930.html
Sent from the AspectJ - users mailing list archive at Nabble.com.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top