public final class ReflectionHelper extends Object
Modifier and Type | Field | Description |
---|---|---|
static Class[] |
EMPTY_CLASS_ARRAY |
Deprecated.
in 2.0. Will become private in a future version.
|
Modifier and Type | Method | Description |
---|---|---|
static <T> Constructor<T> |
getConstructor(Class<T> instantiable,
Class<?>... constructorParameterTypes) |
|
static boolean |
hasDefaultConstructor(Class<?> aClass) |
|
static <T> T |
newInstance(Class<T> aClass) |
This method may return null if the call to create a newInstance() fails.
|
static <T> T |
newInstance(Constructor<T> constructor,
Object... constructorArguments) |
|
static boolean |
parameterTypesMatch(Class<?>[] candidateParamTypes,
Class<?>... desiredParameterTypes) |
@Deprecated public static final Class[] EMPTY_CLASS_ARRAY
public static <T> Constructor<T> getConstructor(Class<T> instantiable, Class<?>... constructorParameterTypes)
public static boolean parameterTypesMatch(Class<?>[] candidateParamTypes, Class<?>... desiredParameterTypes)
public static <T> T newInstance(Constructor<T> constructor, Object... constructorArguments)
public static <T> T newInstance(Class<T> aClass)
public static boolean hasDefaultConstructor(Class<?> aClass)
Copyright © 2004–2017. All rights reserved.