|
|
|
Re: Restrict weaver to only certain packages [message #483797 is a reply to message #483765] |
Thu, 03 September 2009 05:15 |
Andrew Eisenberg Messages: 77 Registered: July 2009 |
Member |
|
|
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?
>
>
|
|
|
|
|
|
Re: Restrict weaver to only certain packages [message #600670 is a reply to message #483765] |
Thu, 03 September 2009 05:15 |
Andrew Eisenberg Messages: 77 Registered: July 2009 |
Member |
|
|
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?
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05370 seconds