public function addDataTypeClass($dataTypeFQCN, $classContent, $replace = false)
    {
        if (strpos($dataTypeFQCN, "Prooph\\Link\\Application\\DataType\\") !== 0) {
            throw new \InvalidArgumentException("Namespace of data type should start with Prooph\\Link\\Application\\DataType\\. Got " . $dataTypeFQCN);
        }
        $nsDirs = explode("\\", str_replace("Prooph\\Link\\Application\\DataType\\", "", $dataTypeFQCN));

        $className = array_pop($nsDirs);

        if (empty($className)) {
            throw new \InvalidArgumentException("Provided data type FQCN contains no class name: " . $dataTypeFQCN);
        }

        $currentPath = $this->toString();

        if (! empty($nsDirs)) {
            foreach ($nsDirs as $nsDir) {
                $currentPath .= DIRECTORY_SEPARATOR . $nsDir;
                if (! is_dir($currentPath)) mkdir($currentPath);
            }
        }

        $filename = $currentPath . DIRECTORY_SEPARATOR . $className . ".php";

        if (!$replace && file_exists($filename)) return;

        file_put_contents($filename, $classContent);
    }