OriginatingClass property
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
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:
|
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