/**
  * Exports the internal reflection data into the ReflectionData cache
  *
  * @return void
  * @throws \F3\FLOW3\Reflection\Exception if no cache has been injected
  * @author Robert Lemke <*****@*****.**>
  */
 protected function saveToCache()
 {
     if (!is_object($this->dataCache)) {
         throw new \F3\FLOW3\Reflection\Exception('A cache must be injected before initializing the Reflection Service.', 1232044697);
     }
     $nonCachedClassNames = array_diff_assoc($this->reflectedClassNames, $this->cachedClassNames);
     $this->log('Found ' . count($nonCachedClassNames) . ' classes whose reflection data was not cached previously.', LOG_DEBUG);
     foreach (array_keys($nonCachedClassNames) as $className) {
         $this->statusCache->set(str_replace('\\', '_', $className), '', array($this->statusCache->getClassTag($className)));
     }
     $data = array();
     $propertyNames = array('reflectedClassNames', 'abstractClasses', 'classConstructorMethodNames', 'classPropertyNames', 'classSchemata', 'classTagsValues', 'subClasses', 'finalClasses', 'finalMethods', 'staticMethods', 'interfaceImplementations', 'methodTagsValues', 'methodParameters', 'methodVisibilities', 'propertyTagsValues', 'taggedClasses');
     foreach ($propertyNames as $propertyName) {
         $data[$propertyName] = $this->{$propertyName};
     }
     $this->dataCache->set('ReflectionData', $data);
     $this->cachedClassNames = $this->reflectedClassNames;
 }