public static <T> T getObj(String className, Object... args) throws ReflectiveOperationException {
    for (Constructor<?> ctor : Class.forName(className).getDeclaredConstructors()) {
      Class<?>[] paramTypes = ctor.getParameterTypes();
      if (paramTypes.length == args.length) {
        int i = 0;
        for (; i < args.length; i++) {
          if (!checkAssignable(paramTypes[i], args[i])) {
            break;
          }
        }
        if (i == args.length) {
          return (T) ctor.newInstance(args);
        }
      }
    }
    throw buildNoConstructorException(className, args);
  }
Instantiate a class instance from a given className with variable number of args
@param className
@param args
@param <T>
@return
@throws ReflectiveOperationException
ambry-utils/src/main/java/com/github/ambry/utils/Utils.java