Updating an Existing Interface Method Implementation
The Interface Implementation Mapper dialog enables you to remap an existing interface method mapping, by:
-
Selecting and viewing the required interface.
-
Entering a new method name or selecting one of the currently compatible methods for each method that you want to remap.
-
Updating the existing interface mapping implementation.
To update an existing interface method implementation
-
In the Class List of the Class Browser, select the class whose interface mapping you want to change.
-
To quickly transition to a different class without closing and reopening the dialog every time, select the required class in the Selected Class drop-down combo box at the top of the dialog.
-
Select the Interface Mapping command from the Classes menu. The Interface Implementation Mapper dialog, containing the current mapping details, is then displayed.
-
In the Implemented Interfaces list box, select the interface whose mapping methods you want to change.
If the Show Inherited check box is checked, the Implemented Interfaces list box also include interfaces implemented on superclasses of the selected class. These mappings cannot be updated. You can update only mappings belonging to the selected class. The inherited interfaces also display the schema and superclass in which they are implemented.
-
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.
-
If you want to make bulk changes to all method names, perform the following actions.
-
In the text box to the right of the Include Method Prefix check box, specify the value that you want to remove from all Jade methods that are mapped to the selected interface.
-
Check (enable) the Include Method Prefix check box.
-
-
To remove a method prefix from all mapped methods, perform the following actions.
-
In the text box at the right of the Include Method Prefix check box, specify the value that you want to remove from all Jade methods that are mapped to the selected interface.
-
Uncheck (disable) the Include Method Prefix check box.
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.
-
-
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.
-
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.