public function add($name, GeneratorInterface $class)
    {
        if (array_key_exists($name, $this->generators)) {
            throw new \InvalidArgumentException('Generator already exists.');
        }

        $this->generators[$name] = $class;
    }