[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Question about implementing generic interfaces
|
Hello,
I have some classes tagged with my annotation @Resource and I would like to
make them all implement a generic interface that require the type of the
annotated class as a generic parameter. I don't know how I can do that with
only 1 aspect for all the classes tagged with my annotaton @Resource.
Here is my current attempt:
public interface Subject<E extends Subject<E>> {
public List<Observer<E>> getObserverList();
public void addObserver(Observer<E> observer);
public void removeObserver(Observer<E> observer);
}
@Resource
public Position {
...
}
aspect SubjectObserverProtocol {
// This is what I can do for now.
declare parents: @Resource Position implements Subject<Position>;
// This is what I want.
declare parents: @Resource * implements Subject<HereGoesTheTaggedClass>;
}
Doe someone know how to do?
Regards,
Vincent Cantin
_________________________________________________________________
Personnalisez votre Messenger avec Live.com
http://www.windowslive.fr/livecom/