public abstract class ConstructorUtils extends Object
| 构造器和说明 |
|---|
ConstructorUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> Constructor<T> |
getConstructor(Class<T> type,
Class<?>... parameterTypes) |
static <T> Constructor<T> |
getConstructorIfAbsent(Class<T> type,
Class<?>... parameterTypes) |
static <T> T |
invokeConstructor(Class<T> cl,
Class<?>[] parameterTypes,
Object... arugments) |
static <T> T |
invokeConstructor(Class<T> cl,
Object... arugments) |
static <T> T |
invokeConstructor(Constructor<T> method,
Object... arugments) |
private static <T> Constructor<T> |
searchConstructor(Class<T> cls,
Constructor<?>[] methods,
Class<?>[] parameterTypes) |
public static <T> T invokeConstructor(Class<T> cl, Class<?>[] parameterTypes, Object... arugments)
public static <T> T invokeConstructor(Constructor<T> method, Object... arugments)
public static <T> Constructor<T> getConstructorIfAbsent(Class<T> type, Class<?>... parameterTypes)
public static <T> Constructor<T> getConstructor(Class<T> type, Class<?>... parameterTypes)
private static <T> Constructor<T> searchConstructor(Class<T> cls, Constructor<?>[] methods, Class<?>[] parameterTypes) throws NoSuchMethodException
Copyright © 2020. All rights reserved.