Folks,
I'm investigating the usage of generics in AspectJ and I am really liking
how it is implemented. However, one problem I've come across is that of
generic introductions.
For example, given the abstract aspect below
abstract aspect Foo<T,S> {
declare parents: T implements Serializable;
declare parents: S implements Serializable;
public void T.setName() {... } // error
}
And the concrete aspect
aspect Test extends Foo<Person,Student> {
}
I get the following error:
Cannot make inter-type declarations on type variables, use an interface and
declare parents public void T.setName() { }
But I'm not entirely sure what this means. Can anyone advise (sic)...? I'm
unsure why my original code doesn't work.
Regards
Neil Loughran
|