Package org.egothor.methodatlas
Record Class DeltaEntry
java.lang.Object
java.lang.Record
org.egothor.methodatlas.DeltaEntry
- Record Components:
changeType- the type of changebefore- the record from the before scan;nullforDeltaEntry.ChangeType.ADDEDentriesafter- the record from the after scan;nullforDeltaEntry.ChangeType.REMOVEDentrieschangedFields- names of fields that differ betweenbeforeandafter; empty forDeltaEntry.ChangeType.ADDEDandDeltaEntry.ChangeType.REMOVEDentries
public record DeltaEntry(DeltaEntry.ChangeType changeType, org.egothor.methodatlas.api.ScanRecord before, org.egothor.methodatlas.api.ScanRecord after, Set<String> changedFields)
extends Record
A single change entry in a MethodAtlas delta report.
Each entry describes one test method that was added, removed, or modified
between two scan outputs. Entries are produced by DeltaReport.compute(java.nio.file.Path, java.nio.file.Path)
and consumed by DeltaEmitter to produce human-readable output.
Change types
DeltaEntry.ChangeType.ADDED— method is present in the after scan but absent from the before scan.before()isnull.DeltaEntry.ChangeType.REMOVED— method is present in the before scan but absent from the after scan.after()isnull.DeltaEntry.ChangeType.MODIFIED— method is present in both scans but one or more comparable fields differ. Bothbefore()andafter()are non-null. ThechangedFields()set names each field that differs.
Changed field names
The changedFields() set uses the following identifiers, which
correspond to CSV column names or human-readable labels:
"loc"— lines of code changed"tags"— JUnit@Tagset changed"source"—content_hashdiffers (class source was edited); only present when both records have a non-nullcontentHash"ai_security_relevant"— security-relevance classification flipped; only present when both records have a non-nullaiSecurityRelevant"ai_tags"— AI taxonomy tag set changed; only present when both records have non-nullaiTags
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDeltaEntry(DeltaEntry.ChangeType changeType, org.egothor.methodatlas.api.ScanRecord before, org.egothor.methodatlas.api.ScanRecord after, Set<String> changedFields) Creates an instance of aDeltaEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.egothor.methodatlas.api.ScanRecordafter()Returns the value of theafterrecord component.org.egothor.methodatlas.api.ScanRecordbefore()Returns the value of thebeforerecord component.Returns the value of thechangedFieldsrecord component.Returns the value of thechangeTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.egothor.methodatlas.api.ScanRecordrecord()Returns the primary record for this entry.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeltaEntry
public DeltaEntry(DeltaEntry.ChangeType changeType, org.egothor.methodatlas.api.ScanRecord before, org.egothor.methodatlas.api.ScanRecord after, Set<String> changedFields) Creates an instance of aDeltaEntryrecord class.- Parameters:
changeType- the value for thechangeTyperecord componentbefore- the value for thebeforerecord componentafter- the value for theafterrecord componentchangedFields- the value for thechangedFieldsrecord component
-
-
Method Details
-
record
public org.egothor.methodatlas.api.ScanRecord record()Returns the primary record for this entry.For
DeltaEntry.ChangeType.ADDEDandDeltaEntry.ChangeType.MODIFIEDentries this is theafter()record. ForDeltaEntry.ChangeType.REMOVEDentries this is thebefore()record. Never returnsnull.- Returns:
- the representative record for this entry
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
changeType
Returns the value of thechangeTyperecord component.- Returns:
- the value of the
changeTyperecord component
-
before
public org.egothor.methodatlas.api.ScanRecord before()Returns the value of thebeforerecord component.- Returns:
- the value of the
beforerecord component
-
after
public org.egothor.methodatlas.api.ScanRecord after()Returns the value of theafterrecord component.- Returns:
- the value of the
afterrecord component
-
changedFields
Returns the value of thechangedFieldsrecord component.- Returns:
- the value of the
changedFieldsrecord component
-