Each subclass contains the components of all classes that lie between this class and
the root node in the inheritance tree. The visibility of a component is always the same and cannot be
changed. However, it is possible to redefine the public and protected instance methods of all preceding
superclasses using the REDEFINITION addition
of the METHODS statement in order to adjust them to the requested specialization.
The interface of a redefined method cannot be changed. The method is merely re-implemented under the
same name.
The method declaration remains with the superclass, and its previous implementation
is also retained there. The implementation of the redefinition is generated additionally with the subclass
and obscures the implementation of the superclass. A redefined method works with the private attributes of the subclass and not with possible private superclass attributes of the same name.
Each reference that points to a subclass object uses the redefined method, even if it was typed with reference to a superclass. In particular, this also applies to the self-reference ME->. For example, if a superclass method M1 contains a call [ME->]M2( ) or CALL METHOD [ME->]M2 and M2 is redefined in a subclass, then calling M1 in an instance of the superclass causes the original method M2</> to be executed and calling M1 in an instance of the subclass causes the redefined method M2 to be executed.
Within a redefined method the pseudo-reference SUPER-> can be used to access the obscured method, for example, to take over and supplement its functions.