You can move member definitions from a class and add them to the implemented interface. To avoid invalidation of existing usages, aliases are declared.
Example
Before Execution | After Execution |
---|---|
To copy the source code example, click here Code Example Before Execution |
|
The cl_car class contains the move method and implements the if_vehicle interface. |
The declarion of the move method has been removed from the cl_car class and added to the if_vehicle interface. Additionally, an alias definition has been added to the cl_car class to avoid invalidations of existing usages. |