THIS-OBJECT system reference

An object reference to the currently running class instance that you can optionally use to access class members defined within the current class hierarchy.

Syntax

THIS-OBJECT [ : class-member-reference ]
class-member-reference

A reference to an instance variable data member, instance property, or instance method defined within the current class hierarchy. Any variable data member cannot be defined as an array (with an EXTENT).

Example

The following code fragment shows two instance methods defined within a class, where you must qualify a call to one of them with THIS-OBJECT because its name, Display, is an ABL reserved keyword:

CLASS TestClass: 

  METHOD VOID Display( ):

  END METHOD.

  METHOD VOID Foo( ):

    THIS-OBJECT:Display( ).

  END METHOD.

END CLASS.

Notes

See also

Class-based method call, THIS-OBJECT statement