Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : GET-CLASS function
 

GET-CLASS function

Returns the object reference for the Progress.Lang.Class instance associated with the specified class or interface type.

Syntax

GET-CLASS ( object-type-name )
object-type-name
Specifies the type name of an ABL or .NET class or interface type, using the syntax described in the Type-name syntax reference entry. With an appropriate USING statement, you can also specify an unqualified class or interface name alone. If object-type-name is not the name of an existing ABL class that can be found on PROPATH or (for Windows) a .NET class that can be resolved based on the assemblies.xml file in use, a compiler error will result.

Example

Unlike the GetClass() method of Progress.Lang.Class, GET-CLASS takes a type name as its argument instead of a CHARACTER expression that holds a type name. As a result, USING statements can be applied to the argument, and the compiler checks the type name at compile time.
The following code uses GET-CLASS to determine if acme.myObjs.CustObj is FINAL:
USING Progress.Lang.*.
USING acme.myObjs.*.

DEFINE VARIABLE lFinal AS LOGICAL.

lFinal = GET-CLASS(CustObj):IsFinal().
MESSAGE "Is the class FINAL? " lFinal VIEW-AS ALERT-BOX.

See also

GetClass( ) method (Progress.Lang.Object)