PreviousNextIndex

IsA( ) method

Returns a LOGICAL value indicating if the class type name expression or Progress.Lang.Class object passed to the method is within the class hierarchy of the Progress.Lang.Class type or implements an interface identified by the Progress.Lang.Class type. The IsA( ) method supports the reflection capabilities of the Progress.Lang.Class class.

Return type: LOGICAL

Access: PUBLIC

Applies to: Progress.Lang.Class class

Syntax
IsA( [ object-reference | class-type-name ] ) 

object-reference
class-type-name

In this example, the IsA( ) method is used to determine if the "Bar" class object is within the hierarchy of the "Customer" class. Note that either the object reference (custType) or the class type name ("Customer") can be passed to the method.

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 "Bar" class object is within the hierarchy of "Customer" 
   class */ 
ASSIGN 
  barType  = Progress.Lang.Class:GetClass("Bar") 
  custType = Progress.Lang.Class:GetClass("Customer"). 
b = barType:IsA(custType). 
/* or */ 
b = barType:IsA("Customer"). 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex