public function addParameter(Parameter $parameter)
    {
        if (array_key_exists($parameter->getName(), $this->definitions)) {
            throw new \Exception(sprintf('Parameter with name \'%s\' already exists!', $parameter->getName()));
        }

        $this->definitions[$parameter->getName()] = $parameter;

        if ($parameter->getIsRequired()) {
            $this->required[] = $parameter->getName();
        }

        return $this;
    }