Skip to main content

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

Hi Ron,

If you wanted to exclude ALL subclasses you could use this code:

private interface SubclassOfMyClass {}

declare parents: MyClass+ && !MyClass: SubclassOfMyClass;

could you decrypt the meaning of this 'incantation' please ?

public pointcut baseConstruction() : execution( MyClass.new() ) && !this(SubclassOfMyClass);

Regards,

-- Eric




Back to the top