### Question:
Reflections { public static boolean typesMatch(Object[] argsArray, Class<?>[] parameterTypes) { if (argsArray.length != parameterTypes.length) return false; return typesMatchUpTo(argsArray, parameterTypes, argsArray.length); } Reflections(ClassLoader classLoader); Reflections applyClassRenames(Map<String,String> newClassRenames); Object loadInstance(String classname, Object...argValues); Object loadInstance(String classname, Class<?>[] argTypes, Object[] argValues); Object loadInstance(String classname); Class<?> loadClass(String classname); @SuppressWarnings("unchecked") Class<? extends T> loadClass(String classname, Class<T> superType); static Class<?> loadInnerClassPossiblyInheritted(Class<?> clazz, String nestedPart); Class<?> loadInnerClassNotInheritted(String outerClassname, String innerClassname); Class<?> loadInnerClassNotInheritted(Class<?> outerClazz, String innerClassname); Constructor<?> loadConstructor(Class<?> clazz, Class<?>[] argTypes); static Optional<T> invokeConstructorWithArgs(ClassLoader classLoader, String className, Object...argsArray); static Optional<T> invokeConstructorWithArgs(ClassLoader classLoader, Class<T> clazz, Object[] argsArray, boolean setAccessible); static Optional<T> invokeConstructorWithArgs(Class<T> clazz, Object...argsArray); static Optional<T> invokeConstructorWithArgs(Class<T> clazz, Object[] argsArray, boolean setAccessible); @SuppressWarnings("unchecked") static Optional<T> invokeConstructorWithArgs(Reflections reflections, Class<T> clazz, Object[] argsArray, boolean setAccessible); Constructor<?> loadSingleConstructor(Class<?> clazz); T loadInstance(Constructor<T> constructor, Object...argValues); Method loadMethod(Class<?> clazz, String methodName, Class<?>[] argTypes); Method loadMethod(Class<?> clazz, String methodName); Object invokeMethod(Method method, Object obj, Object... argValues); Object invokeStaticMethod(Method method, Object... argValues); Object loadStaticField(Class<?> clazz, String fieldname); Object[] loadStaticFields(Class<?> clazz, String[] fieldnamesArray, Object[] defaults); static void copyFields(T source, T target); Class<?> loadClassFromCanonicalName(String canonicalName); @Nullable URL getResource(String r); final Object updateFromNewClassLoader(Object data); ClassLoader getClassLoader(); @SuppressWarnings("unchecked") static Class<? super T> findSuperType(T impl, String typeName); static Set<Class<?>> getInterfacesIncludingClassAncestors(Class<?> clazz); static Method findMethod(Class<?> clazz, String name, Class<?>... parameterTypes); static Field findField(Class<?> clazz, String name); static List<Field> findPublicFieldsOrderedBySuper(Class<?> clazz); static List<Method> findPublicMethodsOrderedBySuper(Class<?> clazz); static Field inferSubbestField(Field f1, Field f2); static Method inferSubbestMethod(Method m1, Method m2); static Class<?> inferSubbest(Class<?> c1, Class<?> c2); @SuppressWarnings("unchecked") static T cast(Object candidate, Class<? extends T> type); static Optional<Object> invokeMethodWithArgs(Object clazzOrInstance, String method, List<Object> args); static Optional<Object> invokeMethodWithArgs(Object clazzOrInstance, String method, List<Object> args, boolean setAccessible); static boolean typesMatch(Object[] argsArray, Class<?>[] parameterTypes); static boolean typesMatchUpTo(Object[] argsArray, Class<?>[] parameterTypes, int lengthRequired); static List<Class<?>> getAllInterfaces(@Nullable Class<?> type); static boolean hasNoArgConstructor(Class<?> clazz); static boolean hasNoNonObjectFields(Class<? extends Object> clazz); static Optional<String> tryFindMappedName(Map<String, String> renames, String name); static String findMappedNameAndLog(Map<String, String> renames, String name);  }### Answer:
@Test public void testTypesMatch() throws Exception { Assert.assertTrue(Reflections.typesMatch(new Object[] { 3 }, new Class[] { Integer.class } )); Assert.assertTrue(Reflections.typesMatch(new Object[] { 3 }, new Class[] { int.class } ), "auto-boxing failure"); }