[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Combining call and execution pointcuts
|
- From: "Andy Clement" <andrew.clement@xxxxxxxxx>
- Date: Mon, 12 May 2008 11:05:03 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=dQ/Rk3Ysiqxfja9QxtMvl88KJOrXZ7PCDYMY51+mCt8=; b=YOdgH4HrqAaBZeJOQW3KMn40P15ZCHUYYJzyUJZgKOnMyKonaPDhsU5FczVcMw8umjXeP7HTvlZqImR1b1iJfmVi3naQZpzJn2u1OtFif+pSvTPXO5KdxhkdqpBQeKmATp5a0loNy+/i77BFhwr/1razg6wF9B4GMLucCIUhZv0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZeHA6TRWqxXav8NmLJfjbeiQs3BMolVy9fhQH0aCHNAly3iVP9vpte5Rjgpk/RX6EijeoPoaKH2zRXG0tGB6at3FDCr69oAtw4n7ZFhMJp2xckHMPia6yjZTTtIURki7NA0Os4fUlnLM7/TxCmUxzZ78oLpThQtVtUJ7YWzzrcI=
ïaspect a {
pointcut a2CalledFromA1():
call(void A.a2()) && withincode(void A.a1());
}
Andy.
2008/5/12 Marko Asplund <marko.asplund@xxxxxxxxxx>:
> 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
>