private function getFromAnnotation(ReflectionClass $class): array
    {
        $sortings = Utils::getRecursiveClassAnnotations($this->getAnnotationReader(), $class, Sorting::class);

        $result = [];
        foreach ($sortings as $classWithAnnotation => $sorting) {
            foreach ($sorting->classes as $className) {
                $this->throwIfInvalidAnnotation($classWithAnnotation, 'Sorting', SortingInterface::class, $className);

                $name = lcfirst(preg_replace('~Type$~', '', Utils::getTypeName($className)));
                $result[$name] = new $className();
            }
        }

        return $result;
    }