Class CoverageFacade

java.lang.Object
org.egothor.methodatlas.coverage.CoverageFacade

public final class CoverageFacade extends Object
Single public entry point used by MethodAtlasApp to drive -emit-coverage.

The package's data records, collector, writer and mapping loader are all package-private so they remain implementation details. The facade exposes only the operations the CLI needs:

  1. load a mapping file (returning the framework label and a sink that must be threaded through the orchestrator);
  2. after the scan, ask the same handle to write the report.
  • Field Details

    • DEFAULT_COVERAGE_FILENAME

      public static final String DEFAULT_COVERAGE_FILENAME
      Default filename used when -coverage-file is not supplied.
      See Also:
  • Method Details

    • prepare

      public static CoverageFacade.Handle prepare(Path mappingFile, double minConfidence) throws IOException
      Loads mappingFile and prepares a coverage collector wrapped inside a CoverageFacade.Handle that the CLI can later pass to the scan orchestrator and the writer.
      Parameters:
      mappingFile - path to the user-authored mapping JSON
      minConfidence - AI minimum-confidence threshold from the CLI
      Returns:
      handle ready for use by the orchestrator and writer
      Throws:
      IOException - if the mapping file cannot be read
      IllegalArgumentException - if the mapping file is invalid