public function getGenerator()
    {
        try {
            if (empty($this->generator)) {
                $this->setGenerator(
                    new Generator(
                        $this->config(static::TOOL_NAME),
                        $this->config(static::TOOL_ID),
                        $this->config(static::TOOL_LAUNCH_URL),
                        (empty($this->config(static::TOOL_DESCRIPTION)) ?
                            false : $this->config(static::TOOL_DESCRIPTION)),
                        (empty($this->config(static::TOOL_ICON_URL)) ?
                            false : $this->config(static::TOOL_ICON_URL)),
                        (empty($this->config(static::TOOL_LAUNCH_PRIVACY)) ?
                            LaunchPrivacy::USER_PROFILE() : $this->config(static::TOOL_LAUNCH_PRIVACY)),
                        (empty($this->config(static::TOOL_DOMAIN)) ? false : $this->config(static::TOOL_DOMAIN))
                    )
                );
            }
        } catch (LTIConfigGeneratorException $e) {
            throw new ConfigurationException(
                $e->getMessage(),
                ConfigurationException::TOOL_PROVIDER
            );
        }
        return $this->generator;
    }