Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW and Subpackages

Hi Norman,

I've been thinking about this but can't explain it.  You could add
some debug to the classloader to see which types are being passed to
the weaver for weaving - perhaps there is some difference when the
script is in the subpackage.

Andy

On 8 February 2010 15:40, Norman Elton <normelton@xxxxxxxxx> wrote:
> I'm using load time weaving (specifically, Andy Clement's very cool
> WeavingGroovyClassLoader) to advise groovy scripts at run time. My
> scripts are all subclasses of a parent class, AuditPoint. I use the
> following pointcut to advise calls to two particular methods:
>
> void around(final AuditPoint audit_point) : target(audit_point) &&
> (execution(void edu.wm.arborist.domain.audit.AuditPoint.check()) ||
> execution(void edu.wm.arborist.domain.audit.AuditPoint.apply()))
>
> This works like a champ, as long as my script is in the same package
> (edu.wm.arborist.domain.audit) as its parent class. I've noticed that
> if I move the script to a subpackage
> (edu.wm.arborist.domain.audit.scripts), my advise is not being applied
> correctly. If I recreate this using compile-time weaving, it does
> work.
>
> Am I missing something here? I've tried various combination of ".."
> and "AuditPoint+" to no avail.
>
> Thanks for any advise (pun intended),
>
> Norman
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top