Class ReflectionHelper
java.lang.Object
org.eclipse.collections.impl.utility.internal.ReflectionHelper
A utility/helper class for working with Classes and Reflection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Class[]
Deprecated.in 2.0.private static final ImmutableMap
<Class<?>, Class<?>> private static final ImmutableMap
<Class<?>, Class<?>> Mapping of iterator wrapper classes to iterator types -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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) private static <T> Constructor
<T> searchForConstructor
(Class<T> instantiable, Class<?>... constructorParameterTypes)
-
Field Details
-
EMPTY_CLASS_ARRAY
Deprecated.in 2.0. Will become private in a future version. -
WRAPPER_TO_PRIMATIVES
Mapping of iterator wrapper classes to iterator types -
PRIMATIVES_TO_WRAPPERS
-
-
Constructor Details
-
ReflectionHelper
private ReflectionHelper()
-
-
Method Details
-
getConstructor
public static <T> Constructor<T> getConstructor(Class<T> instantiable, Class<?>... constructorParameterTypes) -
searchForConstructor
private static <T> Constructor<T> searchForConstructor(Class<T> instantiable, Class<?>... constructorParameterTypes) -
parameterTypesMatch
-
newInstance
-
newInstance
This method may return null if the call to create a newInstance() fails. -
hasDefaultConstructor
-