final public function getMetadata(string $class): ClassMetadata
    {
        $targetsMap = array_flip($this->getTargets());
        $reflectionClass = new \ReflectionClass($class);
        $classMappings = [];
        $properties = [];
        $methods = [];

        if (isset($targetsMap[self::TARGET_CLASS])) {
            $classMappings = $this->getClassMappings($reflectionClass);
        }

        if (isset($targetsMap[self::TARGET_PROPERTY])) {
            $this->getPropertiesMetadata($reflectionClass, $properties);
        }

        if (isset($targetsMap[self::TARGET_METHOD])) {
            $this->getMethodsMetadata($reflectionClass, $methods);
        }

        return new ClassMetadata($class, $classMappings, $properties, $methods);
    }
final public function getMetadata(string $class): ClassMetadata
    {
        $targetsMap = array_flip($this->getTargets());
        $reflectionClass = new \ReflectionClass($class);
        $classMappings = [];
        $properties = [];
        $methods = [];

        if (isset($targetsMap[self::TARGET_CLASS])) {
            $classMappings = $this->getClassMappings($reflectionClass);
        }

        if (isset($targetsMap[self::TARGET_PROPERTY])) {
            $this->getPropertiesMetadata($reflectionClass, $properties);
        }

        if (isset($targetsMap[self::TARGET_METHOD])) {
            $this->getMethodsMetadata($reflectionClass, $methods);
        }

        return new ClassMetadata($class, $classMappings, $properties, $methods);
    }
{@inheritdoc}