Class ReceiptFacade
MethodAtlasApp to materialise a
reproducibility receipt.
The facade exists because ReceiptBuilder and ReceiptWriter
are intentionally package-private — that keeps their helper methods,
canonical-form constants, and Jackson configuration off the public API
surface. The CLI orchestrator lives in a different package and would
otherwise need each of those classes promoted to public, which
would invite incidental external coupling.
The shared ObjectMapper is cached on the facade so the CLI never
pays Jackson's first-call cost more than once per JVM invocation; reuse
across calls is safe because the mapper is configured idempotently.
-
Method Summary
-
Method Details
-
emit
public static void emit(CliConfig config, String toolVersion, String outputModeName) throws IOException Builds and writes a reproducibility receipt for the supplied scan configuration.Resolves the output path from
CliConfig.receiptFile()when set; otherwise falls back tomethodatlas-receipt.jsonin the current working directory. The Jackson mapper is shared across calls; see the class-level Javadoc for the rationale.- Parameters:
config- parsed CLI configuration; must not benulltoolVersion- resolved tool version string ("dev"when the JAR manifest has no implementation version)outputModeName- textual name of the chosen output mode (e.g."SARIF"); persisted in the receipt- Throws:
IOException- if any input file cannot be read for hashing or the receipt file cannot be written
-