protected function createType($typeName)
    {
        if (isset($this->typeCache[$typeName])) {
            return clone $this->typeCache[$typeName];
        }


        if (!$this->hasExtension($typeName)) {
            $class = $this->typeToClassName($typeName);
            $this->typeCache[$typeName] = new $class();
            return clone $this->typeCache[$typeName];
        }

        $this->typeCache[$typeName] = $this->callExtension($typeName, [$typeName, $this]);

        return clone $this->typeCache[$typeName]->setName($typeName);
    }