public function build($className)
    {
        $footprint = $this->_footprintRegistry->get($className);

        $parentClass = $footprint->getParent();
        if (!$parentClass) {
            $parentClass = $this->_baseClassRegistry->find($className);
        }


        if ($footprint->isInterface()) {
            $generator = new InterfaceGenerator();
        } else {
            $traits = $this->_traitRegistry->findByClass($className);

            $generator = new ClassGenerator();
            $generator->useTraits($traits);
        }

        $generator->setName($className);
        $generator->setExtendedClass($parentClass);
        $generator->setImplementedInterfaces($footprint->getInterfaces());

        foreach ($footprint->getConstants() as $name => $value) {
            $generator->addConstant($name, $value);
        }

        $file = new FileGenerator();
        $file->setClass($generator);

        return $file;
    }