Returns a Progress.Lang.Class instance representing the class that the Progress.Reflect.Constructor, Progress.Reflect.Event, Progress.Reflect.Method, or Progress.Reflect.Variable object was retrieved from.
Data type: Progress.Lang.Class class
Access: PUBLIC Read-only
Applies to: Progress.Reflect.Constructor class, Progress.Reflect.Event class, Progress.Reflect.Method class, Progress.Reflect.Variable class
Note that the DeclaringClass property does not necessarily match the OrignatingClass property. For example, consider the classes defined in the following code fragment:
CLASS ClassA: METHOD PUBLIC VOID MethodA: MESSAGE "A method has been called." VIEW-AS ALERT-BOX. END METHOD. END CLASS. CLASS ClassB INHERITS ClassA: END CLASS. CLASS ClassC INHERITS ClassB: METHOD PUBLIC OVERRIDE VOID MethodA: MESSAGE "An overriden method has been called." VIEW-AS ALERT-BOX. END METHOD. END CLASS. |
Calling GetMethod("MethodA", params) on instances of Progress.Lang.Class derived from each of the three classes would return Progress.Reflect.Method instances with the DeclaringClass properties set as shown in the table:
Progress.Lang.Class instance | Class indicated by the DeclaringClass property | Class indicated by the OriginatingClass property |
---|---|---|
ClassA | ClassA | ClassA |
ClassB | ClassA | ClassB |
ClassC | ClassC | ClassC |
The DeclaringClass property for ClassB returns ClassA because MethodA is defined in ClassA and not overidden by ClassB, whereas the OriginatingClass property returns ClassB. The OriginatingClass property returns the name of the class associated with the Progress.Lang.Class instance that you obtained the Progress.Reflect.Method instance from.
See also: DeclaringClass property