IsA( ) methodReturns TRUE if a class or interface represented by the Progress.Lang.Class object or object type-name expression passed to the method is in the hierarchy of the Progress.Lang.Class class instance on which the method is called. Otherwise, the method returns FALSE. The IsA( ) method supports the reflection capabilities of the Progress.Lang.Class class.
Return type:
Access:
Applies to:
IsA ( INPUT object-reference AS Progress.Lang.ClassINPUT object-type-name AS CHARACTER )An object reference to a Progress.Lang.Class instance that can represent a class or interface type.This method returns TRUE when the Progress.Lang.Class class instance on which the method is called represents a class type that:
![]()
Is the same class represented by the Progress.Lang.Class object or class type-name expression passed to the method.
![]()
Derives from (is a subclass of) the class represented by the Progress.Lang.Class object or class type-name expression passed to the method.
![]()
Implements the interface represented by the Progress.Lang.Class object or interface type-name expression passed to the method. The passed interface type can be a super interface in the hierarchy of an interface that is implemented by the class type represented by the Progress.Lang.Class class on which the method is called.In this example, the IsA( ) method is used to determine if a "Customer" object is within the hierarchy of a "Bar" class. Note that "Customer" can represent either a class type or an interface type.
DEFINE VARIABLE b AS LOGICAL NO-UNDO.DEFINE VARIABLE barType AS Progress.Lang.Class NO-UNDO.DEFINE VARIABLE custType AS Progress.Lang.Class NO-UNDO./* Determines if a "Customer" class object is within the hierarchy ofa "Bar" class */ASSIGNbarType = Progress.Lang.Class:GetClass("Bar")custType = Progress.Lang.Class:GetClass("Customer").b = barType:IsA(custType)./* or */b = barType:IsA("Customer").
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |