Before JDK 8 I would write: A implements B
and hit alt+enter to automatically generate the method headers for the methods in B
so I only have to fill in the method bodies.
However in JDK 8 it is possible that B
provides a default
implementation and this doesn't work anymore.
How can I still generate the code in this case?
I'm using IntelliJ IDEA 12.
Alt+Enter is just a shortcut to bring up IDEA's suggested solutions. In your case, it's just a quick way to get to Code|Implement Methods...
or Code|Override Methods...
You can also get to these menus via the Generate menu: Alt+Insert
Or directly via their respective keymaps: Ctrl+O(override) and Ctrl+I(implement)