public static Object newInstance(Class<?> clazz, Object... args) {
        try {
            return findConstructorBestMatch(clazz, args).newInstance(args);
        } catch (IllegalAccessException e) {
            // should not happen
            XposedBridge.log(e);
            throw new IllegalAccessError(e.getMessage());
        } catch (IllegalArgumentException e) {
            throw e;
        } catch (InvocationTargetException e) {
            throw new InvocationTargetError(e.getCause());
        } catch (InstantiationException e) {
            throw new InstantiationError(e.getMessage());
        }
    }
Creates a new instance of the given class.
The constructor is resolved using {@link #findConstructorBestMatch(Class, Object...)}.

@param clazz The class reference.
@param args  The arguments for the constructor call.
@throws NoSuchMethodError     In case no suitable constructor was found.
@throws InvocationTargetError In case an exception was thrown by the invoked method.
@throws InstantiationError    In case the class cannot be instantiated.
android/android_framework/base/src/main/java/util/XposedHelpers.java