public getConstructor(arity as Int = 0) as Constructor:
Returns constructor metadata invocable with the requested arity.
A constructor whose trailing parameters have default values is considered invocable with fewer arguments. For example, a constructor declared as User(name as String = "guest") is returned by getConstructor() and by getConstructor(1).
| Parameter | Description |
|---|---|
arity | Number of arguments that will be supplied. |
Reflected constructor matching that arity.
ctor = User.type.getConstructor() user = ctor.invoke() as User