code: private static <T extends Bean> Constructor<T> findConstructor(Class<T> beanType, List<Class<?>> propertyTypes) {
          Class<?>[] types = propertyTypes.toArray(new Class<?>[propertyTypes.size()]);
          try {
              Constructor<T> con = beanType.getDeclaredConstructor(types);
              return con;
              
          } catch (NoSuchMethodException ex) {
              // try a more lenient search
              // this handles cases where field is a concrete class and constructor is an interface
              @SuppressWarnings("unchecked")
              Constructor<T>[] cons = (Constructor<T>[]) beanType.getDeclaredConstructors();
              Constructor<T> match = null;
              for (int i = 0; i < cons.length; i++) {
                  Constructor<T> con = cons[i];
                  Class<?>[] conTypes = con.getParameterTypes();
                  if (conTypes.length == types.length) {
                      for (int j = 0; j < types.length; j++) {
                          if (!conTypes[j].isAssignableFrom(types[j])) {
                              break;
                          }
                      }
                      if (match != null) {
                          throw new UnsupportedOperationException("Unable to find constructor: More than one matches");
                      }
                      match = con;
                  }
              }
              if (match == null) {
                  String msg = "Unable to find constructor: " + beanType.getSimpleName() + "(";
                  for (Class<?> type : types) {
                      msg += Objects.toString(type.getName(), "<null>");
                  }
                  msg += ")";
                  throw new UnsupportedOperationException(msg, ex);
              }
              return match;
          }
      }
docs: finds constructor which matches types exactly