private function processSingleClass(
        array $advisors,
        StreamMetaData $metadata,
        ReflectionClass $class,
        bool $useStrictMode
    ): bool {
        $advices = $this->adviceMatcher->getAdvicesForClass($class, $advisors);

        if (empty($advices)) {
            // Fast return if there aren't any advices for that class
            return false;
        }

        // Sort advices in advance to keep the correct order in cache, and leave only keys for the cache
        $advices = AbstractJoinpoint::flatAndSortAdvices($advices);

        // Prepare new class name
        $newClassName = $class->getShortName() . AspectContainer::AOP_PROXIED_SUFFIX;

        // Replace original class name with new
        $this->adjustOriginalClass($class, $advices, $metadata, $newClassName);
        $newParentName = $class->getNamespaceName() . '\\' . $newClassName;

        // Prepare child Aop proxy
        $childProxyGenerator = $class->isTrait()
            ? new TraitProxyGenerator($class, $newParentName, $advices, $this->useParameterWidening)
            : new ClassProxyGenerator($class, $newParentName, $advices, $this->useParameterWidening);

        $refNamespace = new ReflectionFileNamespace($class->getFileName(), $class->getNamespaceName());
        foreach ($refNamespace->getNamespaceAliases() as $fqdn => $alias) {
            // Either we have a string or Identifier node
            if ($alias !== null) {
                $childProxyGenerator->addUse($fqdn, (string) $alias);
            } else {
                $childProxyGenerator->addUse($fqdn);
            }
        }

        $childCode = $childProxyGenerator->generate();

        if ($useStrictMode) {
            $childCode = 'declare(strict_types=1);' . PHP_EOL . $childCode;
        }

        $contentToInclude = $this->saveProxyToCache($class, $childCode);

        // Get last token for this class
        $lastClassToken = $class->getNode()->getAttribute('endTokenPos');

        $metadata->tokenStream[$lastClassToken][1] .= PHP_EOL . $contentToInclude;

        return true;
    }