Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How do i apply a pointcut to only an object which implements an interface or is of type X.class or subclass

>   public pointcut PT_new() :
>
>       within(com.foo.BarInterface) &&
>       call(*.new(..));
>

Try this instead:

   public pointcut PT_new() :
       within(com.foo.BarInterface+) &&
       call(*.new(..));

'+' means to include subclasses.


Back to the top