You can get an instance of a Progress.Lang.Class containing the type information for a specified object type by invoking one of these two built-in ABL class methods:

  • GetClass( ) instance method of Progress.Lang.Object invoked on a valid object reference of the specified object type
  • GetClass( ) static method of Progress.Lang.Class invoked on that class type with the object type specified as a character parameter

As an alternative to the static GetClass( ), you can use the GET-CLASS function, which takes an object type name instead of an object type specified as a character string.

This is the syntax to get a Progress.Lang.Class instance containing the specified type information:

Syntax

class-reference = {object-reference:GetClass( ) |
                     Progress.Lang.Class:GetClass( expression ) } .

Element descriptions for this syntax diagram follow:

class-reference
A data element defined as a Progress.Lang.Class.
object-reference
A reference to an instantiated class-based object whose type information you want returned in the Progress.Lang.Class instance.
expression
A CHARACTER expression that evaluates to the fully qualified object type name of the type whose information you want returned in the Progress.Lang.Class instance.

For example, after the calls to GetClass( ) in the following procedure fragment, rType1 and rType2 each reference the same Progress.Lang.Class instance:

USING Progress.Lang.*.
USING acme.myObjs.*.

VAR CustObj rCustObj = NEW CustObj( ).
VAR Class rType1.
VAR Class rType2.

rType1 = rCustObj:GetClass( ).
rType2 = Progress.Lang.Class:GetClass("acme.myObjs.CustObj").

rType1 is obtained using the instance version of GetClass( ), whereas rType2 is obtained using the static version.