Record Class CoverageProbeDetails
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.CoverageProbeDetails
- Record Components:
probeId- Globally unique probe identifier (FNV-1a 64-bit hash)type- The type of control flow point this probe coverssourceFile- Source file path where this probe's code existsstartLine- Starting line number in source (1-based)startColumn- Starting column number in source (1-based)endLine- Ending line number in source (1-based)endColumn- Ending column number in source (1-based)functionId- ID of the function containing this probe (GUID)statementCount- Number of statements covered by this probe
public record CoverageProbeDetails(long probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, long functionId, int statementCount)
extends Record
Represents details about a single coverage probe placed in the IR.
Each probe has a globally unique ID (GUID) generated from a deterministic hash of its location context (module, file, line, type, function). This ensures uniqueness across all source files without requiring coordination during parallel compilation.
Probes are placed at control flow points during IR generation when coverage is enabled.
-
Constructor Summary
ConstructorsConstructorDescriptionCoverageProbeDetails(long probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, long functionId, int statementCount) Creates an instance of aCoverageProbeDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theendColumnrecord component.intendLine()Returns the value of theendLinerecord component.final booleanIndicates whether some other object is "equal to" this one.static CoverageProbeDetailsforLine(long probeId, CoverageProbeType type, String sourceFile, int line, long functionId) Create a simple probe with just line information (column defaults to 1).static CoverageProbeDetailsforRange(long probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, long functionId, int statementCount) Create a probe with full location information.longReturns the value of thefunctionIdrecord component.final inthashCode()Returns a hash code value for this object.booleanCheck if this probe has valid source location information.Get a compact location string for display.longprobeId()Returns the value of theprobeIdrecord component.Returns the value of thesourceFilerecord component.intReturns the value of thestartColumnrecord component.intReturns the value of thestartLinerecord component.intReturns the value of thestatementCountrecord component.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
CoverageProbeDetails
public CoverageProbeDetails(long probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, long functionId, int statementCount) Creates an instance of aCoverageProbeDetailsrecord class.- Parameters:
probeId- the value for theprobeIdrecord componenttype- the value for thetyperecord componentsourceFile- the value for thesourceFilerecord componentstartLine- the value for thestartLinerecord componentstartColumn- the value for thestartColumnrecord componentendLine- the value for theendLinerecord componentendColumn- the value for theendColumnrecord componentfunctionId- the value for thefunctionIdrecord componentstatementCount- the value for thestatementCountrecord component
-
-
Method Details
-
forLine
public static CoverageProbeDetails forLine(long probeId, CoverageProbeType type, String sourceFile, int line, long functionId) Create a simple probe with just line information (column defaults to 1). -
forRange
public static CoverageProbeDetails forRange(long probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, long functionId, int statementCount) Create a probe with full location information. -
hasValidLocation
public boolean hasValidLocation()Check if this probe has valid source location information. -
locationString
Get a compact location string for display. -
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
probeId
-
type
-
sourceFile
Returns the value of thesourceFilerecord component.- Returns:
- the value of the
sourceFilerecord component
-
startLine
-
startColumn
public int startColumn()Returns the value of thestartColumnrecord component.- Returns:
- the value of the
startColumnrecord component
-
endLine
-
endColumn
-
functionId
public long functionId()Returns the value of thefunctionIdrecord component.- Returns:
- the value of the
functionIdrecord component
-
statementCount
public int statementCount()Returns the value of thestatementCountrecord component.- Returns:
- the value of the
statementCountrecord component
-