public invoke(args... as Object) as Object throws Exception:
Invokes the constructor with a direct argument list.
This overload is convenient for reflective code that mirrors a normal constructor call. Arguments are packed in an Object[] before delegating to the native reflection dispatcher.
| Parameter | Description |
|---|---|
args | Constructor arguments. |
New instance.
user = User.type.getConstructor().invoke("Alice", 42) as User