Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] aspects weave package discrimination

Why do some of my classes get advice and some don't? (package dependent)

package com.acme;
public aspect PerformanceMonitor {
    before() : execution(void *.main(..))
    {
        System.out.println("OK aspect before");
    }
}

This is getting applied to classes in com.acme.package1 but not to classes in com.acme.package2... Why? (Actually only 2 of 13 packages under com.acme get woven event tho all have classes that match the pointcut!)

I'm using Eclipse to build on windows, with no non-default settings on java build or aspect weaving. Using java 5.

To confirm weirdness, I right-click created new classes with auto-generated main methods in several packages. After auto-compiling, some classes got advice, some didn't - depending on which package they were created in (under com.acme.whatever).


Any tips would be greatly appreciated!

Thanks!

Craig


Back to the top