[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] jenia - capture method
|
Hi Jenia,
the method itself can be accessed using the AspectJ reflection API :
pointcut anymethod() : call(* * *.*(..));
before() : anymethod() {
MethodSignature sig =
(MethodSignature)thisJoinPointStaticPart.getSignature();
Method m = sig.getMethod();
// Use m as you want to
}
Hope this helps,
Simone
ivlev jenia wrote:
I want to capture the method for which the joinpoint is executed.
pointcut anymethod(method m):call(* * *.*(..))&&target(m)
But this doesnt work ofcourse.
So my question is: how can I capture the method?
Thank you for your kind concern.
Jenia
------------------------------------------------------------------------
The new Internet Explorer® 8 - Faster, safer, easier. Optimized for
Yahoo! *Get it Now for Free!*
<http://downloads.yahoo.com/ca/internetexplorer/>
------------------------------------------------------------------------
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
--
Simone Gianni CEO Semeru s.r.l. Apache Committer
http://www.simonegianni.it/