There is a possibility in AspectJ to modify the class hierarchy using declare statements :
declare parents : TypePattern extends Type;
From http://eclipse.org/aspectj/doc/released/adk15notebook/annotations-decp.html
Basically it allow you to "insert" a class in the hierarchy, here I insert X class :
1. Child extends Parent --> Child extends X extends Parent
2. Child extends SomeClass extends Parent --> Child extends X extends SomeClass extends X extends Parent
However I am looking for a notation that will allow me to resolve the second case to :
2. Child extends SomeClass extends Parent --> Child extends SomeClass extends X extends Parent
My problem is I have Child extends X and SomeClass extends X. Do you know AspectJ notation that would solve this problem ?