public function generateFiles($class, $target) {
        $files = array();
        $includes = "";
        $registers = "";
        
        foreach ($this->aspects as $aspect) {
            $files[] = $aspect->getStoredFile();
            $includes .= "require_once __DIR__ . '/" . str_replace("'", "\'", $aspect->getRelativeFileTarget($target)) . "';\n";
            $registers .= '        $container->registerAspect(new ' . $aspect->getClassName() . "());\n";
        }

        $files[] = fphp\File\TemplateFile::fromSpecification(
            fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                array(
                    "source" => "AspectKernel.php.template",
                    "target" => $target,
                    "rules" => array(
                        array("assign" => "class", "to" => $class),
                        array("assign" => "includes", "to" => trim($includes)),
                        array("assign" => "registers", "to" => trim($registers))
                    )
                ), fphp\Settings::inDirectory(__DIR__))
        );
        
        return $files;
    }