Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : GetConstructor( ) method
 

GetConstructor( ) method

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

GetConstructor ( INPUT params AS Progress.Lang.ParameterList )

GetConstructor ( INPUT flags AS Progrss.Reflect.Flags,
INPUT params AS Progress.Lang.ParameterList )
params
A Progress.Lang.ParameterList instance that describes the parameter list of the constructor you are looking for. If you are looking for a constructor that takes no parameters, pass a ParameterList instance with its NumParameters property set to 0.
flags
A Progress.Reflect.Flags instance 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 the Static flag will raise an error. This method defaults to returning instance constructors, so you do not need to set the Instance flag.

Notes

*You only need to pass the Public, Protected, and/or Private 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 DeclaredOnly and Instance flags are implied.
*GetConstructor(params) returns a Progress.Reflect.Constructor instance describing the default constructor if the NumParameters property of the ParameterList instance 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) does return ABL class constructors defined as private or protected if they satisfy the specified conditions, but you cannot invoke them.
*This method does not return .NET class constructors defined as private.