[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

Is there a way to configure aspectj to only weave a certain package? We
have a large project that cannot be separated out at this time. The
weaving takes a long time. All the classes that need to be weaved are in a
single package. However, watching the progress, it appears to go through
every class to weave it. How can I limit the weaving to speed up the build?
Andrew Eisenberg wrote:
If you use the "within" pointcut, you will tell the weaver not to look in
any other classes/packages than what is specified in your pointcut.  This
should help in your situation.

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?