[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] A little pointcut help please
|
inline
On Tue, Oct 13, 2009 at 7:34 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> Hi Matthew,
>
>> I just realized that there's a bug in my pointcut -- I'm not
>> supporting the prevention of accessing any fields whose class is
>> annotated with @ProtectedInternal. How would I add that one, too?
>
> set((@ProtectedInternal *) *) || get((@ProtectedInternal *) *)
>
Ah, yes. Thanks.
> But the 'of the thing' part of your description makes it hard to
> specify the within in a general way. Obviously you can do it with a
> runtime test in some advice (or perhaps with an if() clause) but that
> prevents you using declare error. I can't think of how else to do it
> - maybe someone else can?
>
> But it doesn't seem entirely unreasonable - you just want the advise
> to be conditional on different properties of the same join point I
> wouldn't be against exploring what we can do here in the language with
> a few changes. I don't know what those changes would be however -
> perhaps we can do more static interpretation of if() clauses:
> if(!thisEnclosingJoinPoint.getPackage().equals(thisJoinPoint.getPackage))
> or similar.
>
Yes, this would be quite nice. I think there were other static
pointcut enhancements that I came across but can't remember right now.
I'll add an issue with this one, and if I (or anyone) can think of
any, they can add it to the issue.
Thanks,
Matthew