private static class BeanUtils.KotlinDelegate
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
KotlinDelegate() |
Modifier and Type | Method and Description |
---|---|
static <T> java.lang.reflect.Constructor<T> |
findPrimaryConstructor(java.lang.Class<T> clazz)
Return the Java constructor corresponding to the Kotlin primary constructor if any.
|
static <T> T |
instantiateClass(java.lang.reflect.Constructor<T> ctor,
java.lang.Object... args)
Instantiate a Kotlin class using the provided constructor.
|
@Nullable public static <T> java.lang.reflect.Constructor<T> findPrimaryConstructor(java.lang.Class<T> clazz)
clazz
- the Class
of the Kotlin classpublic static <T> T instantiateClass(java.lang.reflect.Constructor<T> ctor, java.lang.Object... args) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException
ctor
- the constructor of the Kotlin class to instantiateargs
- the constructor arguments to apply (use null for unspecified parameter if needed)java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException