spring-framework / org.springframework.beans / BeanUtils / findPrimaryConstructor

findPrimaryConstructor

@Nullable open static fun <T : Any> findPrimaryConstructor(clazz: Class<T>): Constructor<T>

Return the primary constructor of the provided class. For Kotlin classes, this returns the Java constructor corresponding to the Kotlin primary constructor (as defined in the Kotlin specification). Otherwise, in particular for non-Kotlin classes, this simply returns null.

Parameters

clazz - the class to check

Since
5.0

See Also
<a href="http://kotlinlang.org/docs/reference/classes.html#constructors">Kotlin docs</a>