Hierarchy for Subclasses

This section describes the elements of the generated/handcrafted class hierarchy for a basic entity class named SubClass that inherits from MyClass.

The UML representation of the generated Java classes for the entity class SubClass would show the following four classes:

As with the previous example there are four Java classes corresponding to class SubClass. However the fact that SubClass inherits from MyClass results in two additional relationships, highlighted here:

  1. Interface SubClass inherits from interface MyClass thereby ensuring that SubClass must implement all of its own declared methods plus those declared in MyClass.
  2. Generated class <ProjectName>.base.SubClass inherits from handcrafted class <ProjectName>.impl.MyClass. This means that SubClass inherits the implementations of the methods from SubClass as well as their declarations, so these methods are available to SubClass and do not have to be re-implemented.