GetMethod( ) method
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns a Progress.Reflect.Method instance describing the class method that matches the specified conditions. If there is no matching method, the method returns the Unknown value (?).
Return type: Progress.Reflect.Method class
Access: PUBLIC
Applies to: Progress.Lang.Class class
Syntax
|
- method-name
- A CHARACTER expression that evaluates to the name of the method.
- params
- A
Progress.Lang.ParameterListinstance that describes the parameter list of the method you are looking for. If you are looking for a method that takes no parameters, pass aParameterListinstance with itsNumParametersproperty set to 0. - flags
- A
Progress.Reflect.Flagsinstance indicating the access mode(s), scope(s), and/or class level(s) the returned method must have. See Progress.Reflect.Flags enumeration for more information.
Notes
- If there are one or more overrides of the specified method,
GetMethod( )returns the override from the most derived subclass that overrides that method. (In other words,GetMethod( )returns the version of the method that would be called if you invoked the method on that class.) For example:
CallingCLASS ClassA: METHOD PUBLIC VOID MethodA: ... END METHOD. END CLASS. CLASS ClassB INHERITS ClassA: METHOD PUBLIC OVERRIDE VOID MethodA: ... END METHOD. END CLASS. CLASS ClassC INHERITS ClassB: END CLASS.GetMethod("MethodA", paramlistForZeroParams) on an instance ofProgress.Lang.Classderived fromClassCreturns aProgress.Reflect.Methodinstance describing theMethodAoverride defined inClassB. In other words, theDeclaringClassproperty would be set toClassB. GetMethod(method-name, params)only returns public, non-static methods.GetMethod(method-name, params, flags)returns all ABL class methods based on the flags specified.- This method does not return .NET class methods defined as private or internal.