ALIASES alias FOR intf~comp.
This statement in the declaration section of a class or interface declares the alias name
for a component
comp of interface
intf. For the name
naming conventions apply. The interface
intf must be implemented in the same class or included in the same interface. You can use the
alias name in any position, in which it is visible, instead of
intf~comp to access the interface component
An alias name belongs to the components of the class and the interface. It shares the namespace with the other components and is inherited by subclasses. In classes, an alias name can be declared in every visibility section.
Within a context, such as a class declaration or method, only one label should be used to access components.
The syntax check issues a warning, if you use both alias name and the complete label
When implementing interface methods in the implementation section of classes using
METHODand when re-defining methods using
METHODS ... REDEFINITION, you are allowed to use the alias name.
In the interfaces
i3 and the class
alias names for the methods of the integrated or implemented interfaces are declared. In the implementation
part of the class, the interface methods in the
statements are implemented using the interface component selector. The alias names of the classes can also be used here.
INTERFACE i1. METHODS meth. ENDINTERFACE. INTERFACE i2. INTERFACES i1. ALIASES m1 FOR i1~meth. METHODS meth. ENDINTERFACE. INTERFACE i3. INTERFACES i2. ALIASES: m1 FOR i2~m1, m2 FOR i2~meth. METHODS meth. ENDINTERFACE. CLASS c1 DEFINITION. PUBLIC SECTION. INTERFACES i3. ALIASES: m1 FOR i3~m1, m2 FOR i3~m2, m3 FOR i3~meth. ENDCLASS. CLASS c1 IMPLEMENTATION. METHOD i1~meth. ... m2( ) ... ENDMETHOD. METHOD i2~meth. ... m3( ) ... ENDMETHOD. METHOD i3~meth. ... m1( ) .... ENDMETHOD. ENDCLASS.