code: public static <T> Constructor<T> findConstructor(Class<T> clazz, Class<?>... params) {
          try {
              return clazz.getConstructor(params);
          } catch (NoSuchMethodException e) {
              @SuppressWarnings("unchecked")
              Constructor<T>[] ctors = (Constructor<T>[]) clazz.getConstructors();
  
              for (Constructor<T> candidate : ctors) {
                  if (w2pEquals(candidate.getParameterTypes(), params)) {
                      return candidate;
                  }
              }
  
              return null;
          }
      }
docs: Tries to find a constructor that is able to accept parameters of the given types. First tries to find the
  constructor matching the exact parameter types. If such a constructor does not exist, tries to find any (the
  first match of arbitrary order) constructor that is able to accept the parameter types by means of auto-boxing,
  i.e. a {@code Constructor(int)} would be returned for the parameters class {@code Integer.class}.
  <p>
  Returns {@code null} if no such constructor could be found.
  
  @param clazz
  the class which should be scanned for constructors
  @param params
  the types of the constructor arguments
  @param <T>
  the class type
  
  @return A constructor that is able of accepting parameters of the specified types, {@code null} if such a
  constructor could not be found.