private int checkCompatibility(Class<?>[] parameterTypes, Executable executable) {
        if (executable.getParameterCount() != parameterTypes.length) {
            return -1;
        }
        Class<?>[] executableParameterTypes = executable.getParameterTypes();
        int result = 0;
        for (int i = 0; i < parameterTypes.length; ++i) {
            if (parameterTypes[i] == null) {
                if (executableParameterTypes[i].isPrimitive()) {
                    return -1;
                }
                result = 1;
            } else {
                Class<?> wrapped = Primitives.wrap(executableParameterTypes[i]);
                if (wrapped != parameterTypes[i]) {
                    if (!wrapped.isAssignableFrom(parameterTypes[i])) {
                        return -1;
                    }
                    result = 1;
                }
            }
        }
        return result;
    }
private int checkCompatibility ( Class < ? > [ ] parameterTypes , Executable executable ) { if ( executable . getParameterCount ( ) != parameterTypes . length ) { return - 1 ; } Class < ? > [ ] executableParameterTypes = executable . getParameterTypes ( ) ; int result = 0 ; for ( int i = 0 ; i < parameterTypes . length ; ++ i ) { if ( parameterTypes [ i ] == null ) { if ( executableParameterTypes [ i ] . isPrimitive ( ) ) { return - 1 ; } result = 1 ; } else { Class < ? > wrapped = Primitives . wrap ( executableParameterTypes [ i ] ) ; if ( wrapped != parameterTypes [ i ] ) { if ( ! wrapped . isAssignableFrom ( parameterTypes [ i ] ) ) { return - 1 ; } result = 1 ; } } } return result ; }
Check if {@code parameterTypes} are compatible with the {@code executable}

@param parameterTypes which are going to be passed into the executable
@param executable     which is being tested for compatibility
@return {@code -1} if the types are not compatible, {@code 0} if they are an exact match ignoring primitive
wrapping or {@code 1} if they are compatible