private static function collectTask(string $className, Task $objectAnnotation)
    {
        $name = $objectAnnotation->getName();
        $beanName = empty($name) ? $className : $name;
        $coroutine = $objectAnnotation->isCoroutine();

        self::$tasks['mapping'][$className] = $beanName;
        self::$tasks['task'][$beanName] = [
            $className,
            $coroutine
        ];
    }