Package org.egothor.methodatlas.command
Class ScanCommand
java.lang.Object
org.egothor.methodatlas.command.ScanCommand
- All Implemented Interfaces:
Command
CLI command handler for the default CSV and
-plain output modes.
Scans one or more source roots, optionally enriches the output with AI suggestions, and emits test-method records incrementally to the supplied writer.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionScanCommand(CliConfig cliConfig, org.egothor.methodatlas.api.TestDiscoveryConfig discoveryConfig, AiSuggestionEngine aiEngine, ClassificationOverride override, AiResultCache aiCache) Creates a new scan command. -
Method Summary
Modifier and TypeMethodDescriptionintexecute(PrintWriter out) Runs the scan and emits output incrementally.
-
Constructor Details
-
ScanCommand
public ScanCommand(CliConfig cliConfig, org.egothor.methodatlas.api.TestDiscoveryConfig discoveryConfig, AiSuggestionEngine aiEngine, ClassificationOverride override, AiResultCache aiCache) Creates a new scan command.- Parameters:
cliConfig- full parsed CLI configurationdiscoveryConfig- discovery configuration forwarded to providersaiEngine- AI engine providing suggestions;nullwhen AI is disabledoverride- human classification overridesaiCache- AI result cache
-
-
Method Details
-
execute
Runs the scan and emits output incrementally.- Specified by:
executein interfaceCommand- Parameters:
out- writer that receives all emitted output- Returns:
0if all files were processed successfully,1if any file produced a parse or processing error- Throws:
IOException- if traversing a file tree fails
-