METHODS
Reference
Syntax
METHODS meth [ABSTRACT|FINAL]
[FOR EVENT evt OF {class|intf}]
[ IMPORTING {{VALUE(p1)|REFERENCE(p1)|p1} typing [OPTIONAL|DEFAULT def1]
{VALUE(p2)|REFERENCE(p2)|p2} typing [OPTIONAL|DEFAULT def2]
... }
[PREFERRED PARAMETER p] ]
[ EXPORTING {{VALUE(p1)|REFERENCE(p1)|p1} typing
{VALUE(p2)|REFERENCE(p2)|p2} typing
... } ]
[ CHANGING
{{VALUE(p1)|REFERENCE(p1)|p1} typing [OPTIONAL|DEFAULT def1]
{VALUE(p2)|REFERENCE(p2)|p2} typing [OPTIONAL|DEFAULT def2]
... } ]
[ RETURNING {VALUE(r)} typing ]
[ {RAISING|EXCEPTIONS} exc1 exc2 ... ].
Effect
Declares an instance method meth in the declaration part of a class or in an interface.
Additions
-
ABSTRACT
Declares an abstract method that cannot be implemented in the same class.
-
FINAL
Declares a final method that cannot be redefined in a subclass.
-
FOR EVENT evt OF {class|intf}
Declares an event handler method that
can handle the event evt of the class
class or of the interface intf. Only input parameters are possible.
-
IMPORTING
Defines
input parameters p1, p2, ...
-
EXPORTING
Defines
output parameters p1, p2, ...
-
CHANGING
Defines
an input/output parameter p1, p2, ...
-
RETURNING
Declares a
functional method with a fully typed return value r.
-
VALUE(p1) ... VALUE(p2) ...
Defines the pass by value for a formal parameter.
-
REFERENCE(p1)|p1 ... REFERENCE(p2)|p2 ...
Defines the pass by reference for a formal parameter.
-
typing
Types the formal parameters.
-
OPTIONAL|DEFAULT
Defines optional input or input/output parameters either with or without the replacement parameters def1, def2, ...
-
PREFERRED PARAMETER p
Declares a parameter p of exclusively optional input parameters as preferred parameters.
-
RAISING|EXCEPTIONS exc1 exc2 ...
Declares either class-based exceptions exc1,
exc2, ... that can be propagated from the subroutine, or defines exceptions exc1, exc2, ... that are not class-based.