create

fun <T> create(className: String, vararg args: Any?): T

Creates and returns an instance of the class identified by className, using the constructor that matches the number of provided args.

Parameters

className

The fully-qualified class name to instantiate.

args

Constructor arguments.

Type Parameters

T

The expected return type.

Throws

if no constructor with the given parameter count is found.