private function getConfiguration()
    {
        // Check for configuration option
        if ($this->configFile == null || !($this->configFile instanceof PhingFile)) {
            return null;
        }

        if (file_exists($this->configFile->__toString()) === false) {
            throw new BuildException(
                'The configuration file "' . $this->configFile->__toString() . '" doesn\'t exist.'
            );
        }

        if ($this->oldVersion) {
            $configurationClassName = 'PHP_Depend_Util_Configuration';
        } else {
            $configurationClassName = 'PDepend\\Util\\Configuration';
        }

        return new $configurationClassName(
            $this->configFile->__toString(),
            null,
            true
        );
    }