Adding methods to Java classes and interfaces in domain modeling class diagrams
You can use domain modeling class diagrams to add a method
to a Java™ class or interface.
Before you begin
About this task
Procedure
- In the diagram editor, right-click a Java class or interface; then click .
- In the Create Java Method wizard, in the Name field, type a name for the new method.
- To make the method a constructor, select the Constructor check box.
- To throw exceptions, in the Throws field, enter an exception.
- Under Type and Dimensions, click a method return type and specify dimensions.
- Under Visibility, click a visibility style.
- Under Modifiers, click modifiers.
- Under Parameters, click Add; then in the Create Parameter window, type a name, select a parameter type, specify dimensions, and click OK.
- Click Finish.