ABAP Objects - Inheritance and Compound Interfaces in Release 4.6A
In ABAP_99A the following components are added to the core
functionality of ABAP Objects:
1 Inheritance
2 Compound interfaces
ABAP_MODIFICATION_1 Inheritance
ABAP Objects enables inheritance
. The addition INHERITING FROM for the statement
CLASS class DEFINITION can be used to derive a
class from a superclass. Each subclass inherits all components from all
superclasses and provides for specialization by adding its own
components and by using the REDEFINITION
previous methods. This makes it possible to define inheritance trees
that become more and more specific from subclass to subclass, starting
from the root node OBJECT .
The additions ABSTRACT and FINAL for the statements
CLASS and METHODS
make it possible to define abstract and final classes and methods.
Abstract classes cannot be instantiated. Abstract methods are not
implemented in their class and can occur only in abstract classes.
Abstract methods can be implemented in a subclass of the abstract
class. Final classes cannot have any subclasses. Final methods cannot
be redefined. All methods of final classes are automatically final.
ABAP_MODIFICATION_2 Compound Interfaces
Interfaces can be nested by
specifying other interfaces as components in the definition of an
interface:
INTERFACE i.
...
INTERFACES: i1, i2 ...
...
ENDINTERFACE.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved