public function addField(FieldInterface $field): Definition
    {
        $name = $field->getName();

        if ($this->hasField($name)) {
            throw new DefinitionException("Field '$name' is already defined.");
        }

        $this->fields[$name] = $field;

        return $this;
    }