Get a Progress.Lang.Class instance
- Last Updated: June 1, 2021
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
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 ofProgress.Lang.Objectinvoked on a valid object reference of the specified object type -
GetClass( )static method ofProgress.Lang.Classinvoked 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
|
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.Classinstance. - expression
- A
CHARACTERexpression that evaluates to the fully qualified object type name of the type whose information you want returned in theProgress.Lang.Classinstance.
For example, after the calls to GetClass( ) in the following procedure fragment, rType1 and rType2 each reference the same
Progress.Lang.Class instance:
|
rType1 is obtained using the instance
version of GetClass( ), whereas rType2 is obtained using the static version.