I was thinking of how in Java we have to duplicate code between interface classes and implementation classes. I was thinking wouldn't it be nice we we can just have our implementation classes generate the interface code. I was thinking of the following approach.


What do you think? Is it even possible?