public function loadDependencies(NameAwareDescriptorInterface $objectDescriptor)
    {

        if ($objectDescriptor instanceof \AppserverIo\Description\FactoryDescriptor) {
            throw new \Exception(print_r($objectDescriptor, true));
        }

        // query whether or not the dependencies have been loaded
        if (isset($this->dependencies[$name = $objectDescriptor->getName()])) {
            return $this->dependencies[$name];
        }

        // initialize the array with the dependencies
        $dependencies = array('method' =>  array(), 'property' => array());

        // check for declared EPB and resource references
        /** @var \AppserverIo\Psr\EnterpriseBeans\Description\ReferenceDescriptorInterface $reference */
        foreach ($objectDescriptor->getReferences() as $reference) {
            // check if we've a reflection target defined
            if ($injectionTarget = $reference->getInjectionTarget()) {
                // add the dependency to the array
                if ($targetName = $injectionTarget->getTargetProperty()) {
                    // append the property dependency
                    $dependencies['property'][$targetName] = $this->loadDependency($reference);
                } elseif ($targetName = $injectionTarget->getTargetMethod()) {
                    // prepare the array with the method dependencies
                    if (!isset($dependencies['method'][$targetName])) {
                        $dependencies['method'][$targetName] = array();
                    }

                    // append the method/constructor dependency
                    $dependencies['method'][$targetName][] = $this->loadDependency($reference);

                } else {
                    // throw an exception
                    throw new DependencyInjectionException(
                        sprintf('Can\'t find property or method %s in class "%s"', $targetName, $name)
                    );
                }
            }
        }

        // return the array with the loaded dependencies
        return $this->dependencies[$name] = $dependencies;
    }