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