Show TOC

 Moving Interfaces to a SuperclassLocate this document in the navigation structure

Use

Interfaces that are implemented by a class can be moved to the direct superclass. The superclass becomes the implementing class.

Caution

A conflict may occur if another subclass of the superclass to which you are moving the interface also implements the interface. In this case, this subclass would inherit the interface after the move and would implement it again. This scenario is not allowed.

Procedure
  1. Select the class that implements the interface to be moved.
  2. Make sure you are in Change mode.
  3. Choose Utilities → Refactoring → RefactoringAssistant.
  4. Select the interface to be moved and move it to the name of the superclass using Drag & Drop.
  5. Choose Save.
Result

The superclass implements the interface that you have moved.