[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.ajdt] Re: Restrict weaver to only certain packages
|
- From: Andrew Eisenberg <andrew.eisenberg@xxxxxxxxxxxxxxxx>
- Date: Wed, 02 Sep 2009 22:15:48 -0700
- Newsgroups: eclipse.technology.ajdt
- Organization: EclipseCorner
- Thread-index: AcosVZi/vvWiL8o8mEq5VfABizC4Tw==
- Thread-topic: Restrict weaver to only certain packages
- User-agent: Microsoft-Entourage/12.20.0.090605
So, what you have seems to be a fairly complex set statement. That *might*
be confusing AspectJ and causing it to weave more than it needs to. And if
so, then I'd suggest that you raise a bug report for that, because within()
should be restricting the weaver.
Before you do that, try simplifying the pointcut. Just use set(* *
MyType.*) and see if that changes what types are getting woven. If only the
proper class is woven, then we can be pretty sure it has something to do
with the way the pointcut is structured.
I'll be off for a couple of weeks after this, so I won't be able to reply.
I'd recommend that you post to the AspectJ users mailing list if you have
any further questions.
http://www.eclipse.org/aspectj/userlists.php
> Thank you for the response. I tried that and now have the following as my
> pointcut:
>
> pointcut fieldMutator(Object o, Object v) : set(!transient !static
> !final (byte || short || int || long || float || double || boolean || char
> || java.lang.String) (MyType).*) && this(o) && args(v) && within(MyType);
>
> I then have advice as follows:
>
> void around(Object o, Object v) : fieldMutator(o, v) {...}
>
>
> However, as I watch the progress view, it still shows "woven ..." on
> various types as it is building.
>
> So... that doesn't seem to be working. Is there something else I need to
> do?
>
>