Package org.egothor.methodatlas.eval
Class AccuracyReportRenderer
java.lang.Object
org.egothor.methodatlas.eval.AccuracyReportRenderer
Renders an
AccuracyEvaluator.Evaluation as Markdown or JSON.
Determinism
The output is a pure function of the evaluation: lines end with \n on
every platform (never the platform line separator), numbers are formatted with
Locale.ROOT to four decimal places (never a locale decimal comma), tags
are listed in sorted order, and the report contains no timestamp, path or host
information. Two runs over the same inputs are therefore byte-identical on any
operating system, in line with the cross-platform determinism contract of the
scan output.
An undefined metric (zero denominator, see AccuracyMetrics) is rendered
as n/a in Markdown and as JSON null.
This class is stateless and thread-safe.
- Since:
- 6.1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intJSON report schema version; bump on any breaking field change. -
Method Summary
-
Field Details
-
JSON_SCHEMA_VERSION
public static final int JSON_SCHEMA_VERSIONJSON report schema version; bump on any breaking field change.- See Also:
-
-
Method Details
-
markdown
Renders the evaluation as a Markdown document.- Parameters:
ev- evaluation to render; must not benull- Returns:
- Markdown text with
\nline endings, ending in a newline
-
json
Renders the evaluation as a JSON document.Keys appear in a fixed order. Undefined metrics are
null.- Parameters:
ev- evaluation to render; must not benull- Returns:
- JSON text with
\nline endings, ending in a newline
-