ALIASES alias FOR intf~comp.
This statement in the declaration section of a class or interface declares the alias name alias for a component comp of interface intf. For the name alias the 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 comp.
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.
In the interfaces i2, i3 and the class c1, 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 METHODS statements are implemented using the interface component selector. As of release 6.40, the alias names of the classes can also be used here. Within methods, the alias names can also be used before release 6.40.
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.