GetConstructor( ) method
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns a Progress.Reflect.Constructor instance describing the class constructor that matches the specified conditions. If there is no matching constructor, the method returns the Unknown value (?).
Return type: Progress.Reflect.Constructor class
Access: PUBLIC
Applies to: Progress.Lang.Class class
Syntax
|
- params
- A
Progress.Lang.ParameterListinstance that describes the parameter list of the constructor you are looking for. If you are looking for a constructor that takes no parameters, pass aParameterListinstance with itsNumParametersproperty set to 0. - flags
- A
Progress.Reflect.Flagsinstance indicating the access mode(s) the returned constructor must have. See Progress.Reflect.Flags enumeration for more information.CAUTION: This method does not return static constructors, so setting theStaticflag will raise an error. This method defaults to returning instance constructors, so you do not need to set theInstanceflag.
Notes
- You only need to pass the access mode flags, as desired. This method never returns a constructor from a super class of the class it is applied to, and the method only returns instance constructors, so the
DeclaredOnlyandInstanceflags are implied. GetConstructor(params)returns aProgress.Reflect.Constructorinstance describing the default constructor if theNumParametersproperty of theParameterListinstance passed to it is set to 0 and no other constructor is defined.GetConstructor(params, flags)returns the default constructor under the same conditions if the constructor matches the specified flags.GetConstructor(params)only returns public constructors.GetConstructor(params, flags)returns all ABL class constructors based on the flags specified.- This method does not return .NET class constructors defined as private.