code: private boolean typesAreCompatible(Class<?>[] paramTypes, Class<?>[] constructorParamTypes) {
          boolean matches = true;
          for (int i = 0; i < paramTypes.length; i++) {
              Class<?> paramType = paramTypes[i];
              if (paramType != null) {
  
                  Class<?> inputParamType = translateFromPrimitive(paramType);
                  Class<?> constructorParamType = translateFromPrimitive(constructorParamTypes[i]);
  
                  if (inputParamType.isArray() && Collection.class.isAssignableFrom(constructorParamType)) {
                      continue;
                  }
  
                  if (!constructorParamType.isAssignableFrom(inputParamType)) {
                      matches = false;
                      break;
                  }
              }
          }
          return matches;
      }
docs: Checks if a set of types are compatible with the given set of constructor parameter types. If an input type is
  null, then it is considered as a wildcard for matching purposes, and always matches.
  
  @param paramTypes            A set of input types that are to be matched against constructor parameters.
  @param constructorParamTypes The constructor parameters to match against.
  @return whether the input types are compatible or not.