Package org.egothor.methodatlas.command


package org.egothor.methodatlas.command
CLI command handler implementations for MethodAtlas.

Each class in this package encapsulates one logical CLI mode and implements the Command interface. The thin routing layer in MethodAtlasApp.run(java.lang.String[], java.io.PrintWriter) selects the appropriate command based on the parsed command-line flags and delegates to it via Command.execute(java.io.PrintWriter).

Command handlers

Shared infrastructure

The shared infrastructure that the commands compose is decomposed into a small set of focused collaborators:

  • PluginLoader — resolves TestDiscovery and SourcePatcher providers via ServiceLoader and validates plugin-ID uniqueness.
  • OverrideLoader — loads classification override YAML files into ClassificationOverride instances.
  • ContentHasher — produces SHA-256 class fingerprints and forward-slashed scan-root file prefixes; pure static helpers.
  • AiRuntimeBuilder — builds the per-run AI engine, the result cache, and resolves taxonomy metadata.
  • ScanOrchestrator — owns the scan-and-emit loop and the apply-tags helpers (collectMethodsByFile, gatherAiSuggestionsForFile, filterSink). Constructed once per CLI run with an injected PluginLoader.

Access conventions

All classes in this package are declared public so that the routing layer in MethodAtlasApp can instantiate them. They are nonetheless considered internal implementation details: callers outside this package should not depend on specific command classes; they should interact only with the Command interface.

  • Class
    Description
    Bundle of AI infrastructure that is constant for the duration of a scan run.
    Constructs the per-run AI infrastructure: the suggestion engine, the result cache, and the human-readable taxonomy descriptor.
    CLI command handler for the -apply-tags mode.
    CLI command handler for the -apply-tags-from-csv mode.
    A self-contained CLI command handler.
    Pure utility helpers for content fingerprints and scan-root path prefixes.
    CLI command handler for the -diff mode.
    CLI command handler for the -github-annotations output mode.
    CLI command handler for the -json output mode.
    CLI command handler for the -manual-prepare mode.
    Loads classification override files into ClassificationOverride instances.
    Resolves and configures discovery plugins via ServiceLoader.
    CLI command handler for the -sarif output mode.
    CLI command handler for the default CSV and -plain output modes.
    Orchestrates the scan-and-emit loop that every command mode is built around.