public function addOption($name, Option $opt = null) {
        if (isset($this->configOpts[$name]) || isset($this->configArgs[$name])) {
            throw new ConfigException('option/argument already set: ' . $name);
        }

        if (is_null($opt)) {
            $opt = new Option();
        }

        $this->configOpts[$name] = $opt;
        return $opt;
    }