Record Class DeltaReport.DeltaResult

java.lang.Object
java.lang.Record
org.egothor.methodatlas.DeltaReport.DeltaResult
Record Components:
beforePath - path to the before CSV file
afterPath - path to the after CSV file
beforeTimestamp - scan_timestamp metadata extracted from the before file, or null when the file was produced without -emit-metadata
afterTimestamp - scan_timestamp metadata extracted from the after file, or null
totalBefore - total number of test methods in the before scan
totalAfter - total number of test methods in the after scan
securityRelevantBefore - number of security-relevant methods in the before scan; 0 when no AI columns were present
securityRelevantAfter - number of security-relevant methods in the after scan; 0 when no AI columns were present
entries - unmodifiable list of changed entries in (fqcn, method) order
unchangedCount - number of methods present in both scans with no detected differences
Enclosing class:
DeltaReport

public static record DeltaReport.DeltaResult(Path beforePath, Path afterPath, String beforeTimestamp, String afterTimestamp, int totalBefore, int totalAfter, int securityRelevantBefore, int securityRelevantAfter, List<DeltaEntry> entries, int unchangedCount) extends Record
The aggregate result of comparing two MethodAtlas scan outputs.

The entries() list contains only changed methods (ADDED, REMOVED, MODIFIED). Unchanged methods are represented only by the unchangedCount() counter to keep the report concise.

  • Constructor Details

    • DeltaResult

      public DeltaResult(Path beforePath, Path afterPath, String beforeTimestamp, String afterTimestamp, int totalBefore, int totalAfter, int securityRelevantBefore, int securityRelevantAfter, List<DeltaEntry> entries, int unchangedCount)
      Creates an instance of a DeltaResult record class.
      Parameters:
      beforePath - the value for the beforePath record component
      afterPath - the value for the afterPath record component
      beforeTimestamp - the value for the beforeTimestamp record component
      afterTimestamp - the value for the afterTimestamp record component
      totalBefore - the value for the totalBefore record component
      totalAfter - the value for the totalAfter record component
      securityRelevantBefore - the value for the securityRelevantBefore record component
      securityRelevantAfter - the value for the securityRelevantAfter record component
      entries - the value for the entries record component
      unchangedCount - the value for the unchangedCount record component
  • Method Details

    • addedCount

      public int addedCount()
      Returns the number of DeltaEntry.ChangeType.ADDED entries.
    • removedCount

      public int removedCount()
      Returns the number of DeltaEntry.ChangeType.REMOVED entries.
    • modifiedCount

      public int modifiedCount()
      Returns the number of DeltaEntry.ChangeType.MODIFIED entries.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • beforePath

      public Path beforePath()
      Returns the value of the beforePath record component.
      Returns:
      the value of the beforePath record component
    • afterPath

      public Path afterPath()
      Returns the value of the afterPath record component.
      Returns:
      the value of the afterPath record component
    • beforeTimestamp

      public String beforeTimestamp()
      Returns the value of the beforeTimestamp record component.
      Returns:
      the value of the beforeTimestamp record component
    • afterTimestamp

      public String afterTimestamp()
      Returns the value of the afterTimestamp record component.
      Returns:
      the value of the afterTimestamp record component
    • totalBefore

      public int totalBefore()
      Returns the value of the totalBefore record component.
      Returns:
      the value of the totalBefore record component
    • totalAfter

      public int totalAfter()
      Returns the value of the totalAfter record component.
      Returns:
      the value of the totalAfter record component
    • securityRelevantBefore

      public int securityRelevantBefore()
      Returns the value of the securityRelevantBefore record component.
      Returns:
      the value of the securityRelevantBefore record component
    • securityRelevantAfter

      public int securityRelevantAfter()
      Returns the value of the securityRelevantAfter record component.
      Returns:
      the value of the securityRelevantAfter record component
    • entries

      public List<DeltaEntry> entries()
      Returns the value of the entries record component.
      Returns:
      the value of the entries record component
    • unchangedCount

      public int unchangedCount()
      Returns the value of the unchangedCount record component.
      Returns:
      the value of the unchangedCount record component