When you want to override interface and superclass methods in a Java file, use the Override Methods tool to quickly select from all the available methods.
The Override Methods tool generates the selected methods with proper declarations. You override the methods with your own code in the Source Editor.
To generate code for overriding methods:
The Override Methods dialog box is displayed.
The All Inherited Classes list contains all the superclasses that your class inherits from, as well all interfaces that your class implements and their superclasses.
The Available Methods list shows all methods declared in the classes selected in Step 2 that are appropriate for overriding. The tool filters out final, static, private, and package-private methods so you can be sure that all the methods you see can be overridden.
Use the options to the right of the Available Methods list to fine-tune the methods displayed in the list:
The Selected Methods list contains all the methods you selected in Step 3, as well as all the methods that were already redefined in your source code before you ran the Override Methods tool.
Methods that you added to the Selected Methods list are created in your class's source file with proper declarations and empty bodies or superclass calls.
See also | |
---|---|
Synchronizing Source Code
Using the Import Management Tool |