[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Can I add in my aspect file if else conditions before pointcut's or declare
|
- From: "Eric Bodden" <eric.bodden@xxxxxxxxxxxxxx>
- Date: Tue, 4 Dec 2007 09:31:08 -0500
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=c6o3Yqce+MJFJxemlfQERx5ZuI1ZKwAJ8ZOQ2ZzUbwM=; b=sNNMRzYEHV9jHtharz1loQvOQZQMr3vjvzmKXeVSVQ/Uas83whgWDeKPCZ3Y+TfejY5Y/lVDWUV1+2oUW8NJnLxXB+XNiDmxft2bcoO47fhCj+3ifR83B0xjrHytYrgVrknX2NHJ/4MDmju7ICZ9rS+tgqjmta9l0kCqaJHDkuQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=JqEQ5hp+FQfWjY6vf0Nm8MrmgPovc2eF83YMuitBER3oHCUtFKUCKXPO2R1m3kSHSb2Fme+5BwzYAKRg4lHgIhVNMqjLNxZNzfnnWRVz8fvLzZHuf6wyPND+iBs+kXGNCQNfiagWxBA8vtto/PZLl3zMOti+5UDb3wD76u1P0WI=
That's a good one :-) I *love* that syntax! Unfortunately that's not
possible in AJ.
You cannot define a pointcut within a body of code. Rather use
something like this:
aspect A {
boolean isAdd = true
pointcut aspectCheckAccess():execution(public * *(..)) && if(isAdd);
...
}
Eric
On 04/12/2007, Meir Yanovich <meiry@xxxxxxxxxxxx> wrote:
> Hello all
> Well i can't compile the aspect files if I trying to add something like
>
> Boolean isAdd = true
>
> If(isAdd){
> pointcut aspectCheckAccess():execution(public * *(..));
> }
>
> Can I do something equivalent in the aspectJ syntax?
>
> Thanks
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
--
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada