Using Class Builder, you can easily manage the methods defined by your class. Class Builder assists you in adding a new method, adding a method based on an existing definition, modifying a method, and deleting a method.
To display the methods in your class
Start Class Builder and make sure your class is selected by Class Builder. For information on how to do this, see Starting Class Builder.
Click the Methods tab in Class Builder. The Methods list displays the methods that are currently defined by your class. (Depending on the current settings for Class Builder, this list may be filtered. For more information, see Setting Class Builder Options.)
To add a new method
Click Add. In the Add Method dialog box, enter the information for the method:
Enter the name of the method in the Method Name box.
Select a return type from the Return Type drop-down list or enter your own return type.
In the Parameters grid, specify the method parameters. In the left column of the grid, select a parameter type from the drop-down list or enter your own type. In the right column, enter the name of the parameter.
Select an access modifier from the Access drop-down list. Methods can be declared as public, protected, private, or default (package).
To insert Javadoc comments for the method, enter the comment text in the Javadoc comment box.
Click Add.
To add a method based on an existing definition
Select a method from the Member Methods list and click Clone. The Clone Method dialog box displays the information for the selected method, which is the basis for the new method.
Replace the name in the Method Name box with the name of the new method. Modify the remaining selections as needed.
Click Add.
To modify an existing method definition
Select the method from the Member Methods list and click Modify.
In the Modify Method dialog box, modify the information for the method and then click Modify.
To delete a method that has already been declared
Select the method from the Member Methods list and click Delete.