public function getParent(ClassMetadata $class)
    {
        $className = $class->getName();
        if (!class_exists($className) || (!$parent = get_parent_class($className))) {
            return null;
        }

        return $this->getClassByName($parent);
    }