Hi and thanks for the reply,
Well I think that adding an interface with declare parents and not specifying an implementation is not a problem in AspectJ,
if it were not so, what should serve declare parents? If i had to implement directly the interface by hard coding it in the classes i can also specify an implements clause in the class declaration, isn't it?
I know it's a strange behaviour to add an interface with aspectj and pretend that classes works as the interface was present, but i'm trying to create an aspect that implements the GoF command pattern (like in the work of Jan Hannemann and Gregor Kiczales
https://www.cs.ubc.ca/labs/spl/projects/aodps.html )
And I want to underline that everything work fine except the implicit cast when extracting the ClassImplementingInferf instance from the collection.
I've made some other tests and i found out that
MyInterface var2 = (MyInterface)(ClassImplementingInterf)x.get(0);
Works fine, but
MyInterface fromLst = x.get(0);
throw ClassCastException
I think it's a strange behaviour!
I hope i was clearer.
Regards,
Luca