Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] intercept Class but not SubClass

Hello.
I have written a simple aspect to run after MyClass.new is executed.
Thing is, I also have MySubClass which extends MyClass.  And the aspect
seems to be intercepting that as well.

public pointcut myCutting() : execution( MyClass.new() ) && !execution( MySubClass.new() );


That doesn't seem to be doing it.  Is that correct or is there some other
way to make sure that no sub-classes get intercepted?

Thanks a lot.


Charlie



Back to the top