private function generateFilesForArtifacts($artifacts, $fileSettingsGetter, $extend) {
        foreach ($artifacts as $artifact) {
            $settings = $artifact->getGeneratorSettings(static::getKey());

            foreach (call_user_func(array($this, $fileSettingsGetter), $settings) as $file) {
                $specification = $this->getSpecification($file, $settings, $artifact);
                $extendableFile = $this->getExtendableFile($specification);
                if ($extendableFile && $extend) {
                    $places = $extendableFile->extend($specification);
                    foreach ($places as $placePair) {
                        if (!is_array($placePair))
                            $placePair = array(new \FeaturePhp\Artifact\SettingsPlace($artifact), $placePair);
                        $this->tracingLinks[] = new fphp\Artifact\TracingLink(
                            static::getKey() === "template" ? "rule" : "chunk", $artifact, $placePair[0], $placePair[1]);
                    }
                    $this->logFile->log($artifact, "extended file \"{$specification->getTarget()}\"");
                }
            }
        }
    }