package de.example; import de.example.A.InnerA; public aspect BAspect { InnerA B.someMethod(){ A as = new A(); return as.new InnerA(); } InnerA B.someOtherMethod(){ return someMethod(); } }