class ClassUtil {

    public static <T> T newInstance(String className, Class[] argTyps, Object[] args) {
        try {
            Class clazz = ClassUtil.class.getClassLoader().loadClass(className);
            Constructor constructor = clazz.getConstructor(argTyps);
            return (T) constructor.newInstance(args);
        } catch (Throwable e) {
            throw new IllegalStateException("new an instance of " + className + " err!", e);
        }
    }

    private  ClassUtil();

}