[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Combining call and execution pointcuts
|
- From: Gopinathan Balaji <gopinathanbalaji@xxxxxxxxx>
- Date: Mon, 12 May 2008 05:03:12 -0700 (PDT)
- Delivered-to: aspectj-users@eclipse.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=lRdkmWcWkhLFk4lFYCuf9oblJyae9p9hr9A6/xVC+cR3yeqDad/dmLMa+L4cQvvchoFgYF84BWeydPL1M26WfqJdCwUaKJFHYLZgWlHXoT7enRPJaNWS9L7j9pxzpNaIh6FB9EbR2aV8E4x8N3w+Ukw/4MkewJgVQH0Z2nS1Dn8=;
Try:
aspect a {
pointcut a2CalledFromA1():
cflow(execution(void A.a1())) && call(void A.a2());
}
-B.
----- Original Message ----
From: Marko Asplund <marko.asplund@xxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Sent: Monday, May 12, 2008 5:28:49 PM
Subject: [aspectj-users] Combining call and execution pointcuts
Hi,
How can I pick out direct calls to a certain method from a particular
method?
For example how can I define a pointcut that picks out calls to a2()
from a1() in class A below?
I've tried the following pointcut definition but it doesn't seem to work
as expected:
ïaspect a {
pointcut a2CalledFromA1():
execution(void A.a1()) && call(void A.a2());
}
class A {
void a1() {
a2();
}
void a2() {
}
}
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users