Class ScanCommand

java.lang.Object
org.egothor.methodatlas.command.ScanCommand
All Implemented Interfaces:
Command

public final class ScanCommand extends Object implements 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 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 configuration
      discoveryConfig - discovery configuration forwarded to providers
      aiEngine - AI engine providing suggestions; null when AI is disabled
      override - human classification overrides
      aiCache - AI result cache
  • Method Details

    • execute

      public int execute(PrintWriter out) throws IOException
      Runs the scan and emits output incrementally.
      Specified by:
      execute in interface Command
      Parameters:
      out - writer that receives all emitted output
      Returns:
      0 if all files were processed successfully, 1 if any file produced a parse or processing error
      Throws:
      IOException - if traversing a file tree fails