Class ApiContractTrackerSource
java.lang.Object
com.arc_e_tect.gradle.trackerlens.tracker.ApiContractTrackerSource
- All Implemented Interfaces:
TrackerSource
TrackerSource for the API-detector plugins' shared contract progress-history NDJSON,
one record per line with fields fingerprint, verb, path,
declaringClass, declaredAt, implementedAt, stubbedAt,
verifiedAt, lastSeenAt, removedAt.
This module has no code dependency on api-detector-core; the schema below is
hand-parsed directly from the known, fixed NDJSON shape that library writes, the same way that
library's own store hand-parses it - see this class's Javadoc rather than any shared code for
the field-by-field mapping. This is the current, 10-field shape; a 9-field file written
before stubbedAt existed does not match LINE_PATTERN at all and every one of
its lines is logged and skipped as malformed - see api-detector-core's
LegacyContractHistoryFormatException for the equivalent, more specific failure on the
writing side.
Stages, in canonical order: declared, implemented, stubbed,
verified.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReadshistoryFileand returns theLifecycleRecords it contains.
-
Constructor Details
-
ApiContractTrackerSource
public ApiContractTrackerSource()Creates a newApiContractTrackerSource.
-
-
Method Details
-
read
Description copied from interface:TrackerSourceReadshistoryFileand returns theLifecycleRecords it contains.- Specified by:
readin interfaceTrackerSource- Parameters:
historyFile- the NDJSON history file; guaranteed by the caller to exist- Returns:
- the parsed records; a line that fails to parse is skipped rather than failing the read
-