/**
  * Initializes the bean configuration instance with the references of the passed reflection class instance.
  *
  * @param \AppserverIo\Lang\Reflection\ClassInterface $reflectionClass The reflection class with the bean configuration
  *
  * @return void
  */
 public function referencesFromReflectionClass(ClassInterface $reflectionClass)
 {
     // we've to check for property annotations that references EPB or resources
     foreach ($reflectionClass->getProperties() as $reflectionProperty) {
         // load the EPB references
         if ($epbReference = EpbReferenceDescriptor::newDescriptorInstance()->fromReflectionProperty($reflectionProperty)) {
             $this->addEpbReference($epbReference);
         }
         // load the resource references
         if ($resReference = ResReferenceDescriptor::newDescriptorInstance()->fromReflectionProperty($reflectionProperty)) {
             $this->addResReference($resReference);
         }
         // load the persistence unit references
         if ($persistenceUnitReference = PersistenceUnitReferenceDescriptor::newDescriptorInstance()->fromReflectionProperty($reflectionProperty)) {
             $this->addPersistenceUnitReference($persistenceUnitReference);
         }
     }
     // we've to check for method annotations that references EPB or resources
     foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
         // load the EPB references
         if ($epbReference = EpbReferenceDescriptor::newDescriptorInstance()->fromReflectionMethod($reflectionMethod)) {
             $this->addEpbReference($epbReference);
         }
         // load the resource references
         if ($resReference = ResReferenceDescriptor::newDescriptorInstance()->fromReflectionMethod($reflectionMethod)) {
             $this->addResReference($resReference);
         }
         // load the persistence unit references
         if ($persistenceUnitReference = PersistenceUnitReferenceDescriptor::newDescriptorInstance()->fromReflectionMethod($reflectionMethod)) {
             $this->addPersistenceUnitReference($persistenceUnitReference);
         }
     }
 }