You can use domain modeling class diagrams to create extends
relationships between Java classes.
Before you begin
You cannot create extends relationships between Java classes in the following situations:
- Between two Java classes where the sub Java class already extends another class (multiple
extends or inheritance relationships are not supported in Java)
- Between two Java classes where the super class
is a final class
- When the source type is in a named project and the target type
is in a default package.
You must have a domain modeling class diagram open.
About this task
To create an extends relationship between two Java classes, complete the following steps:
Procedure
- In the Palette, click Extends.
- In the diagram editor, click the sub (client) Java class, drag it to the super (supplier) Java class, and release the mouse button.
What to do next
Tip: You can also use the modeling assistant
to create extends relationships.