Class FindPipeline
java.lang.Object
io.github.jspinak.brobot.action.basic.find.FindPipeline
Encapsulates the Find operation pipeline, orchestrating all steps of the pattern matching
process.
This class implements a clear separation of concerns by organizing the Find operation into three distinct phases:
- Pre-processing: Color profile creation and initial offset setup
- Strategy execution: Running the selected find strategy
- Post-processing: State management, match fusion, adjustments, and text extraction
By extracting the orchestration logic from the Find class, this pipeline:
- Makes the find process more testable and maintainable
- Provides clear extension points for customization
- Enables easier debugging and monitoring of each phase
- Allows for future pipeline variations without changing the Find facade
- Since:
- 1.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFindPipeline
(ProfileSetBuilder profileSetBuilder, OffsetMatchCreator offsetLocationManager, MatchFusion matchFusion, MatchRegionAdjuster matchAdjuster, MatchContentExtractor contentExtractor, NonImageObjectConverter nonImageObjectConverter, StateMemory stateMemory, TextSelector textSelector, DynamicRegionResolver dynamicRegionResolver, ModernFindStrategyRegistry findStrategyRegistry, ActionSuccessCriteria actionSuccessCriteria, StateMemoryUpdater stateMemoryUpdater, ConciseFindLogger conciseFindLogger) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(BaseFindOptions findOptions, ActionResult matches, ObjectCollection... objectCollections) Executes the complete find pipeline with the provided options and collections.
-
Constructor Details
-
FindPipeline
@Autowired public FindPipeline(ProfileSetBuilder profileSetBuilder, OffsetMatchCreator offsetLocationManager, MatchFusion matchFusion, MatchRegionAdjuster matchAdjuster, MatchContentExtractor contentExtractor, NonImageObjectConverter nonImageObjectConverter, StateMemory stateMemory, TextSelector textSelector, DynamicRegionResolver dynamicRegionResolver, ModernFindStrategyRegistry findStrategyRegistry, ActionSuccessCriteria actionSuccessCriteria, StateMemoryUpdater stateMemoryUpdater, @Autowired(required=false) ConciseFindLogger conciseFindLogger)
-
-
Method Details
-
execute
public void execute(BaseFindOptions findOptions, ActionResult matches, ObjectCollection... objectCollections) Executes the complete find pipeline with the provided options and collections.- Parameters:
findOptions
- The configuration options for the find operationmatches
- The action result to populate with matchesobjectCollections
- The collections of objects to search for
-