ConstructorAccessor

Interface for accessing and invoking constructors through reflection. Provides a type-safe way to create new instances of classes using their constructors with proper error handling and performance optimization.

Parameters

T

the type of object that will be created by the constructor

Inheritors

Properties

Link copied to clipboard
abstract val constructor: Constructor<T>

The underlying Java Constructor object for creating instances. This constructor is used for reflection-based instantiation.

Functions

Link copied to clipboard
open fun invoke(args: Array<Any?> = emptyArray<Any?>()): T

Invokes the constructor with the specified arguments to create a new instance. Uses FastInvoke.safeNewInstance for proper exception handling and performance.