code: private static <T> Constructor<T> lookupConstructor(Class<T> clazz, Object[] pArguments) throws NoSuchMethodException {
          Class[] argTypes = extractArgumentTypes(pArguments);
          return clazz.getConstructor(argTypes);
      }
docs: Lookup appropriate constructor