core/play/src/main/java/play/libs/reflect/ClassUtils.java
public static boolean isAssignable(
      Class<?>[] classArray, Class<?>[] toClassArray, boolean autoboxing) {
    if (arrayGetLength(classArray) != arrayGetLength(toClassArray)) {
      return false;
    }
    if (classArray == null) {
      classArray = EMPTY_CLASS_ARRAY;
    }
    if (toClassArray == null) {
      toClassArray = EMPTY_CLASS_ARRAY;
    }
    for (int i = 0; i < classArray.length; i++) {
      if (isAssignable(classArray[i], toClassArray[i], autoboxing) == false) {
        return false;
      }
    }
    return true;
  }
public static boolean isAssignable(
      Class<?>[] classArray, Class<?>[] toClassArray, boolean autoboxing) {
    if (arrayGetLength(classArray) != arrayGetLength(toClassArray)) {
      return false;
    }
    if (classArray == null) {
      classArray = EMPTY_CLASS_ARRAY;
    }
    if (toClassArray == null) {
      toClassArray = EMPTY_CLASS_ARRAY;
    }
    for (int i = 0; i < classArray.length; i++) {
      if (isAssignable(classArray[i], toClassArray[i], autoboxing) == false) {
        return false;
      }
    }
    return true;
  }
public static boolean isAssignable ( Class < ? > [ ] classArray , Class < ? > [ ] toClassArray , boolean autoboxing ) { if ( arrayGetLength ( classArray ) != arrayGetLength ( toClassArray ) ) { return false ; } if ( classArray == null ) { classArray = EMPTY_CLASS_ARRAY ; } if ( toClassArray == null ) { toClassArray = EMPTY_CLASS_ARRAY ; } for ( int i = 0 ; i < classArray . length ; i ++ ) { if ( isAssignable ( classArray [ i ] , toClassArray [ i ] , autoboxing ) == false ) { return false ; } } return true ; }
Checks if an array of Classes can be assigned to another array of Classes.

<p>This method calls {@link #isAssignable(Class, Class) isAssignable} for each Class pair in
the input arrays. It can be used to check if a set of arguments (the first parameter) are
suitably compatible with a set of method parameter types (the second parameter).

<p>Unlike the {@link Class#isAssignableFrom(java.lang.Class)} method, this method takes into
account widenings of primitive classes and {@code null}s.

<p>Primitive widenings allow an int to be assigned to a {@code long}, {@code float} or {@code
double}. This method returns the correct result for these cases.

<p>{@code Null} may be assigned to any reference type. This method will return {@code true} if
{@code null} is passed in and the toClass is non-primitive.

<p>Specifically, this method tests whether the type represented by the specified {@code Class}
parameter can be converted to the type represented by this {@code Class} object via an identity
conversion widening primitive or widening reference conversion. See <em><a
href="http://java.sun.com/docs/books/jls/">The Java Language Specification</a></em>, sections
5.1.1, 5.1.2 and 5.1.4 for details.

@param classArray the array of Classes to check, may be {@code null}
@param toClassArray the array of Classes to try to assign into, may be {@code null}
@param autoboxing whether to use implicit autoboxing/unboxing between primitives and wrappers
@return {@code true} if assignment possible
Checks if an array of Classes can be assigned to another array of Classes .