code: @SuppressWarnings("unchecked")
      public static <T> Constructor<T> findMatchingConstructor(Class<T> classToInspect, Object... params) {
          Constructor<T> checkedConstructors = null;
          for (Constructor<?> constructor : classToInspect.getDeclaredConstructors()) {
              Type[] parameterTypes = constructor.getParameterTypes();
              if (parameterTypes.length == params.length && checkParameterTypes(parameterTypes, params)) {
                  if (checkedConstructors == null) {
                      checkedConstructors = (Constructor<T>) constructor;
                  } else {
                      throw BusinessException.createNew(BusinessErrorCode.AMBIGUOUS_CONSTRUCTOR_FOUND)
                              .put("constructor1", constructor)
                              .put("constructor2", checkedConstructors)
                              .put("object", classToInspect.getSimpleName())
                              .put("parameters", params);
                  }
              }
          }
          return checkedConstructors;
      }
docs: Finds a constructor matching the given parameters.