[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Reusable aspects that have concrete aspects in different packages
|
Nope, not missing import statements. :) I found the cause of this all:
the abstract pointcut stateChanges(Subject subject) in
observer.SubjectObserverProtocol.aj was not public. So abstract
pointcuts should be declared public if one want to implement abstract
aspects in other packages. Though I observed that if the pointcut
stateChanges(Subject subject) in observer.SubjectObserverProtocol.aj
were NOT abstract and NOT public, then the compiler wouldn't complain...
Thanks.
Ramnivas Laddad wrote:
I think SubjectObserverProtocolImpl.aj is missing some import statements.
-Ramnivas
===
Ramnivas Laddad,
Author, AspectJ in Action
http://ramnivas.com
Dmitri Mamrukov wrote:
Greetings!
I was exploring the possibility to introduce reusable aspects into my
project. So I wrote an abstract aspect A in one package and an
implementation aspect that concretizes the abstract aspect A in a
*different* package. However, I get a compile error "inherited
abstract pointcut ... is not made concrete in ...".
For instance, after I added the Subject-Observer Protocol example
(examples/observer) to my Eclipse workspace, I created another
package observer.xxx and moved
observer.SubjectObserverProtocolImpl.aj to that new package
observer.xxx. (In meanwhile, I accordingly modified the visibility of
classes in the package observer and their methods and added
appropriate imports to observer.xxx.SubjectObserverProtocolImpl.aj.)
This way I get a compile error:
"inherited abstract pointcut
observer.SubjectObserverProtocol.stateChanges(observer.Subject) is
not made concrete in observer.xxx.SubjectObserverProtocolImpl
SubjectObserverProtocol.aj Observer Example/src/observer"
Am I missing anything? Do I have to confine abstract and concrete
aspects to the same package? Is there a way to write concretizing
aspects in different packages?
Any suggestion would be appreciated,
Dmitri
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users