import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.DeclareMixin; @Aspect public class PR298388 { @DeclareMixin("Thing2") public static Thing createThingImplementation() { return new ThingImpl(); } public static void main(String[] args) { Thing ts = (Thing) new Thing2(); ts.wibble(); ts.wibble("abc"); String s = ts.wibbleBack("wobble"); System.out.println("done"); } } class Thing2 { } interface Thing { void wibble(); void wibble(X x); X wibbleBack(X x); } class ThingImpl implements Thing { ThingImpl() { } public void wibble() { } public void wibble(X x) {} public X wibbleBack(X x) { return x;} }