code: @SuppressWarnings("unchecked")
    protected Constructor resolveCompatibleConstructor(final Class<?> objectType, final Class<?>[] parameterTypes) {
      for (Constructor constructor : objectType.getConstructors()) {
        Class[] constructorParameterTypes = constructor.getParameterTypes();
  
        if (parameterTypes.length == constructorParameterTypes.length) {
          boolean match = true;
  
          for (int index = 0; index < constructorParameterTypes.length; index++) {
            match &= constructorParameterTypes[index].isAssignableFrom(parameterTypes[index]);
          }
  
          if (match) {
            return constructor;
          }
        }
      }
  
      return null;
    }
docs: Resolves the matching constructor for the specified Class type who's actual public constructor argument types
  are assignment compatible with the expected parameter types.
  
  @param objectType the Class from which the constructor is resolved.
  @param parameterTypes the array of Class types determining the resolved constructor's signature.
  @return a matching constructor from the specified Class type who's actual public constructor argument types
  are assignment compatible with the expected parameter types.
  @throws NullPointerException if either the objectType or parameterTypes are null.
  @see #resolveConstructor(Class, Class[])
  @see java.lang.Class
  @see java.lang.reflect.Constructor