spring-framework / org.springframework.util / ReflectionUtils / accessibleConstructor

accessibleConstructor

open static fun <T : Any> accessibleConstructor(clazz: Class<T>, vararg parameterTypes: Class<*>): Constructor<T>

Obtain an accessible constructor for the given class and parameters.

Parameters

clazz - the clazz to check

parameterTypes - the parameter types of the desired constructor

Exceptions

NoSuchMethodException - if no such constructor exists

Return
the constructor reference

Since
5.0