protected function generate($path, $filename)
    {
        $generator = new ClassGenerator();
        $generator->generate(file_get_contents($filename));
        $fqcn = $generator->getClassBuilder()->getClass();
        $compiler = new Compiler();
        $class = $compiler->parseClassName($fqcn);
        $path = $this->createDirFromNamespace($path, $class['namespace']);
        $output = $path . '/' . $class['classname'] . '.php';
        $generator->write($output);
    }