Viewing Interface Method Mappings
Although all interface methods implemented by a class selected in the Class List of the Class Browser are displayed in the Methods List of the Class Browser, you can display the implemented methods grouped by the interface or interfaces in which they are defined.
This can be useful if your class contains many methods and implements a number of interfaces, particularly when the same implemented method can be defined in one or more interfaces.
By default, implemented interface methods are not grouped by interface.
To view all implemented interface mappings
-
Select the Interface folder in the Methods List window in the hierarchy Class Browser.
The Methods list then displays all implemented interfaces and mapped methods as a two‑level hierarchy. The top level displays the names of all interfaces implemented on the selected class and the second level displays all of their implemented methods.
If a method has multiple interface mappings, it displays the method under each of the mapped interfaces. If the implemented method name differs from the interface method name, the interface method name is displayed in parentheses after the implemented methods name.
The following image shows the implemented methods listed below the interface or interfaces in which they are defined.
To group implemented methods into interfaces in which they are defined for all Methods List folders
-
Select the Show Interface Method Mappings command from the View menu.
The Methods List then displays all implemented methods and methods defined in a selected class, followed by each interface name and their implemented methods. A check mark is displayed at the left of the command in the View menu to indicate that interface methods mappings are shown.
Selecting the Show Interface Method Mappings command from the View menu does not change what is displayed when viewing the Interface method list folder, as it already displays this information.
For details about implementing an interface for a class, see "Implementing an Interface", later in this chapter.