Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Do the lock() and unlock() pointcuts allow type matching?

I'm trying to match all instances in my application where synchronization is used on a specific type.  I would expect this could be written fairly easily as:
    
    after(Object o): args(mytypeexpression) && args(o) && lock() {
        System.out.println("args after lock " + o.toString());
    }

or as

    after(MyType o): args(o) && lock() {
        System.out.println("args after lock " + o.toString());
    }

however, neither of these work, even though o is accessible as an object of type MyType.

Is this expected behaviour?

Jon

Back to the top