public function getOperator(string $className, LeafType $type): AbstractOperator
    {
        if (!is_a($className, AbstractOperator::class, true)) {
            throw new Exception('Expects a FQCN implementing `' . AbstractOperator::class . '`, but instead got: ' . $className);
        }

        $key = Utils::getOperatorTypeName($className, $type);

        if (!isset($this->types[$key])) {
            $instance = new $className($this, $type);
            $this->registerInstance($instance);
        }

        return $this->types[$key];
    }