protected function questionClassInstance()
    {
        $classname = $this->questionClass();

        if (!class_exists($classname)) {
            throw new \Exception('Invalid question class.');
        }

        $instance = (new \ReflectionClass($classname))
            ->newInstanceArgs($this->questionClassArgs());

        if (!$instance instanceof \Symfony\Component\Console\Question\Question) {
            throw new \Exception('Invalid question class instance');
        }

        return $instance;
    }