Product Information > JADE Development Environment User’s Guide > Chapter 14 - Adding and Maintaining Interfaces > Updating an Existing Interface Method Implementation

Updating an Existing Interface Method Implementation

The Interface Implementation Mapper dialog enables you to remap an existing interface method mapping, by:

To update an existing interface method implementation

  1. In the Class List of the Class Browser, select the class whose interface mapping you want to change.

  2. Select the Interface Mapping command from the Classes menu. The Interface Implementation Mapper dialog, containing the current mapping details, is then displayed.

  3. In the Available Interfaces list box, select the interface whose mapping methods you want to change.

  4. Change the required mapping method or methods in the second column of the table by entering a new method name or by selecting a complementary method from the drop-down list in the combo box.

  5. If you want to make bulk changes to all method names, perform the following actions.

    1. Ensure that the Add Method Prefix value is displayed in the Modifier list box (the default value).

    2. Specify the value in the Value text box (for example, test_) that you want to apply to all JADE methods that are mapped to the interface.

    3. Click the Modify button.

  6. To remove a method prefix from all mapped methods, perform the following actions.

    1. Select the Remove Method Prefix value in the Modifier list box.

    2. Specify the value in the Value text box that you want to remove from all JADE methods that are mapped to the interface.

    3. Click the Modify button.

    If you want to remove a method prefix from all JADE methods in the target class that are mapped to the interface, perform the actions in this step before you click the Implement button.

    As the modification of a mapped method name (both adding and removing a prefix) creates a corresponding method, removing a prefix does not remove the method from the target class. For more details, see "Stopping the Implementation of an Interface", in the following section.

  7. Click the Update button, to update the existing interface mapping implementation.

    The target class is updated to include any new methods that are required to satisfy the interface. Generated stub methods in classes implementing interfaces provide only the method signature and template; that is, they do not provide any implementation details. (For details about using the Miscellaneous sheet of the Preferences dialog to specify that do not cause a compile error, see "Maintaining Miscellaneous Options", in Chapter 2.) To compile the method or methods in the target class, delete or comment out the text line. It is your responsibility to define the appropriate source for each method in the implementing class so that it performs the required action or actions.

    A message box is displayed if you are attempting to implement an interface on the current version of a class when it is already implemented on the latest version, prompting you to discontinue the interface implementation.

  8. Click the Close button.

If you click the Close button before you have clicked the Update button, a message box is displayed, prompting you to confirm that you want to save pending changes before closing the dialog. If you click the No button in the Interface Implementation Mapper message box, your mappings to that interface are not updated.