[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Concretize abstract pointcut with subtypes
|
The code you wrote is syntactically wrong, so I assume it's
not a copy of your code. But based on the signature, perhaps
you're trying to overload the one pointcut name:
Though named pointcut declarations appear somewhat like method
declarations, and can be overridden in subaspects, they cannot
be overloaded. It is an error for two pointcuts to be named
with the same name in the same class or aspect declaration
Programming Guide, Semantics appendix.
Is that the mistake made? If not, some (non-)working code that
others could try to compile would help frame your question.
hth - Wes
> ------------Original Message------------
> From: Charles Zhang <czhang@xxxxxxxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Sun, Aug-22-2004 10:16 AM
> Subject: [aspectj-users] Concretize abstract pointcut with subtypes
>
> Hi, I wonder if this is intended or just wrongful usage:
> class A implements some reusable functionality.
> class B extends class A with some specific functionality.
> My aspect defines an abstract pointcut:
> abstract pointcut(A a);
> which is concretized in a sub-aspect as follows:
> pointcut(B b):call(* B.*(..))&&target(b);
>
> The purpose is to reuse some of the advices involving the abstract
> pointcut in the abstract aspect in concrete scenarios.
>
> This is flagged as a compiler error.
>
> Thanks for any help.
>
> Charles
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
>