class ReflectionUtil {

    public static Object invokeMethod(Method method, Object target, Object...args) {
        if (method == null) {
            return null;
        }

        method.setAccessible(true);
        try {
            return method.invoke(target, args);
        } catch (Exception ex) {
            throw ExceptionUtil.toRuntimeException(ex);
        }

    }

}