METHODS

Short Reference

Syntax Forms



General Instance Methods

1. METHODS meth [ABSTRACT|FINAL]
    [IMPORTING parameters [PREFERRED PARAMETER p]]
    [EXPORTING parameters]
    [CHANGING  parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...].

Functional Instance Methods

2. METHODS meth [ABSTRACT|FINAL]
    [IMPORTING parameters [PREFERRED PARAMETER p]]
    RETURNING VALUE(r) typing
    [{RAISING|EXCEPTIONS} exc1 exc2 ...].

Instance Constructors

3. METHODS constructor [FINAL]
    [IMPORTING parameters [PREFERRED PARAMETER p]]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...].

Event Handlers

4. METHODS meth [ABSTRACT|FINAL]
     FOR EVENT evt OF {class|ifac}
     [IMPORTING p1 p2 ... [sender]].

Redefinition of Instance Methods

5. METHODS meth [FINAL] REDEFINITION.

Definition of a Test Method

6. METHODS meth [ABSTRACT|FINAL]
    FOR TESTING
    [RAISING exc1 exc2 ...].

Effect

The statement METHODS declares or redefines an instance method meth. For the name meth, the naming conventions apply. Instance methods are linked to objects. To use instance methods, you must first create an object of the class. In instance methods, you can access all components of the own class without a component selector.

Use the variants of statement METHODS to distinguish between the following kinds of method declarations: