Implementing Methods of an Interface
On this page:
If a class is declared as implementing a certain interface or extending a class with abstract methods, it has to implement the methods of such interface or class. RubyMine creates stubs of the implemented methods, with the default return values for the primitive types, and null values for the objects.
To implement method of an interface or abstract class , follow these steps:
- Do one of the following:
- On the main menu, choose .
- Press Ctrl+I
- Right-click the editor, choose Generate on the context menu, or press Alt+Insert, and choose Implement methods.
- Select one or more methods to implement. For multiple selection, use Ctrl and Shift keys.
- Click OK.
Changing method body
For example, consider the following file template: