Show TOC

 Moving Interfaces to a SubclassLocate this document in the navigation structure

Use

Interfaces that are implemented by a class can be moved to their subclasses. The relevant subclass(es) become the implementing classes. For more information, see Class Diagram.

Caution

A conflict may occur if the interface is not moved to all subclasses. The interface components resulting from inheritance are deleted in the subclasses that do not implement the interface.

Procedure
  1. In the Class Builder, open the class that implements the interface to be moved.
  2. Make sure you are in Change mode.
  3. Choose Utilities → Refactoring → Refactoring Assistant.
  4. Select the interface to be moved and move it to the name of the superclass using Drag & Drop.

    If there is more than one subclass, you can move the selected interface to all the subclasses in one step by dragging the interface to Subclasses.

  5. Choose Save.
Result

The corresponding subclasses implement the interface.