DefaultConstructorAccessor

Default implementation of ConstructorAccessor that provides basic constructor invocation capabilities. This class automatically ensures the constructor is accessible during initialization, making it ready for reflection-based instantiation of private, protected, or package-private constructors.

Type Parameters

T

the type of object that will be created by the constructor

Constructors

Link copied to clipboard
constructor(constructor: Constructor<T>)

Properties

Link copied to clipboard
open override val constructor: Constructor<T>

the Java constructor to be accessed

Functions

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

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

Link copied to clipboard
open override fun newInstance0(): T
Link copied to clipboard
open override fun newInstance1(arg: Any?): T
Link copied to clipboard
open override fun newInstance2(arg1: Any?, arg2: Any?): T