This method is used to optimize the matching process.

@param \Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex
@return \Neos\Flow\Aop\Builder\ClassNameIndex
547988
public function reduceTargetClassNames(\Neos\Flow\Aop\Builder\ClassNameIndex $classNameIndex)
    {
        $classNames = $this->reflectionService->getClassNamesByAnnotation(Flow\ValueObject::class);
        $annotatedIndex = new \Neos\Flow\Aop\Builder\ClassNameIndex();
        $annotatedIndex->setClassNames($classNames);
        return $classNameIndex->intersect($annotatedIndex);
    }
372030
public function getColumnStylesForColumn($columnIndex)
    {
        if (!$this->hasColumnStylesForColumn($columnIndex)) {
            return false;
        }

        $columnStyles = $this->getColumnStyles();

        return $columnStyles[$columnIndex] ?? false;
    }
766205
public function createCollection($className)
    {
        $className = (string) $className;
        if (array_key_exists($className, $this->aliases)) {
            $className = $this->aliases[$className];
        }

        return $this->getCollectionManager()->create($className);
    }
902589
public function getCustomSorting(string $className, string $name): ?SortingInterface
    {
        $this->fillCache($className);

        return $this->customSortings[$className][$name] ?? null;
    }
669149
public function compareIndexes(Index $oldIndex, Index $newIndex)
    {
        return ($oldIndex->getName() !== $newIndex->getName())
            || ($oldIndex->getColumnNames() !== $newIndex->getColumnNames())
            || ($oldIndex->isUnique() !== $newIndex->isUnique());
    }
934098
public function createClassConstantReference(string $className): ClassConstFetch
    {
        $nameNode = new FullyQualified($className);

        return $this->builderFactory->classConstFetch($nameNode, 'class');
    }
913741
public function reduceTargetClassNames(ClassNameIndex $classNameIndex): ClassNameIndex
    {
        $classNames = $this->reflectionService->getClassesContainingMethodsAnnotatedWith($this->annotation);
        $annotatedIndex = new ClassNameIndex();
        $annotatedIndex->setClassNames($classNames);
        return $classNameIndex->intersect($annotatedIndex);
    }
903002
public function addAlias(string $name, string $className)
    {
        $this->aliases[$name] = $className;
        return $this;
    }
147517
public static void index(final Indexer indexer, final ClassLoader cl, final String className) {
        final InputStream stream = cl.getResourceAsStream(className.replace('.', '/') + ".class");
        try {
            indexer.index(stream);
        } catch (final IOException ex) {
            throw new RuntimeException(ex);
        }
    }
1256889
public function newInstance($index)
    {
        $id = strtolower($index);
        if (!isset(static::$indexList[get_called_class()][$id])) {
            throw new \RuntimeException('No FileRequest found for: ' . $id);
        }
        $class = static::$indexList[get_called_class()][$id];
        return new $class;
    }
581868
public function getColumnStyle($columnIndex) {
        if (isset($this->columnStyles[$columnIndex])) {
            return $this->columnStyles[$columnIndex];
        }

        return $this->getStyle();
    }
84542
public static function query(string $className): QueryBuilder
    {
        $instance = self::getInstance($className);

        return Query::table($className)->className($className)->selectInstance($instance);
    }
103094
public function index($index = null) {
		if (is_null($index))
			return $this->discard('query.index');
	
		if ($index instanceof Column) {
			//get referred attribute
			$map = $this->entityProfile->getPropertyMap();
			if (!in_array($index->getName(), $map))
				throw new \InvalidArgumentException(sprintf("Column '%s' is unknown for class '%s'", $index->getName(), $this->entityProfile->getReflectionClass()->getName()));
			$name = array_flip($map)[$index->getName()];
		}
		elseif ($index instanceof Attr)
			$name = $index->getName();
		elseif (is_string($index))
			$name = $index;
		else
			throw new \InvalidArgumentException("Index must be specified through an Attr instance or a valid property name");
			
		//get custom type (if any)
		$type = ($index instanceof Field) ? $index->getType() : null;	
		if (isset($type))
			return $this->merge(['query.index' => $name. ':' . $type]);
		return $this->merge(['query.index' => $name]);
	}
152910
protected function getIndex()
	{
		if (!$this->index) {
			$this->index = $this->getClient()->initIndex($this->name);
		}
		
		return $this->index;
	}
888094
protected function buildNameIndex()
    {
        $this->namedRoutes = [];
        foreach ($this->routes as $route) {
            $name = $route->getName();
            if ($name) {
                $this->namedRoutes[$name] = $route;
            }
        }
    }
666510
public function getSort($className='CSort')
	{
		if($this->_sort===null)
		{
			$this->_sort=new $className;
			if(($id=$this->getId())!='')
				$this->_sort->sortVar=$id.'_sort';
		}
		return $this->_sort;
	}
676987
public function reindex($className)
    {
        $this->checkImplementsSearchableInterface($className);
        $activeRecord = $this->activeRecordFactory->make($className);

        $records = $this->activeQueryChunker->chunk(
            $activeRecord->find(),
            self::CHUNK_SIZE,
            function ($activeRecordEntities) {
                return $this->getAlgoliaRecordsFromSearchableModelArray($activeRecordEntities);
            }
        );

        /* @var SearchableInterface $activeRecord */
        $indices = $this->initIndices($activeRecord);

        return $this->processIndices($indices, function (Index $index) use ($records) {
            return $this->reindexAtomically($index, $records);
        });
    }