Multiple interfaces in a hierarchy
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Multiple interfaces in a hierarchy
Each class implementing an interface is required to implement all members of the interface. However, a class inheriting from a class already implementing the same interface also inherits all of the implementations. Thus you need not explicitly implement the members.
Interface inheritance allows the same interface to appear multiple times within an interface hierarchy. That is, it is valid for an interface to inherit member prototypes from an interface that it already inherits from.
For example:
|
|
|
|
The following figure depicts the interface hierarchy where interface IMyZ is inherited by both interface IMyY and IMyA.

It is not an error having interface IMyZ appear
twice in the hierarchy. It is however, a compile time error to have
an interface appear within its own hierarchy.
For example:
|
The above example results in a compile time error.