Record Class CoverageProbeDetails
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.CoverageProbeDetails
- Record Components:
probeId- Unique probe identifier within the module (0-based)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 probestatementCount- Number of statements covered by this probe
public record CoverageProbeDetails(int probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, int functionId, int statementCount)
extends Record
Represents details about a single coverage probe placed in the IR.
Each probe has a unique ID within its module and captures source location information for reporting. Probes are placed at control flow points during IR generation when coverage is enabled.
-
Constructor Summary
ConstructorsConstructorDescriptionCoverageProbeDetails(int probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, int 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(int probeId, CoverageProbeType type, String sourceFile, int line, int functionId) Create a simple probe with just line information (column defaults to 1).static CoverageProbeDetailsforRange(int probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, int functionId, int statementCount) Create a probe with full location information.intReturns 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.intprobeId()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(int probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, int 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(int probeId, CoverageProbeType type, String sourceFile, int line, int functionId) Create a simple probe with just line information (column defaults to 1). -
forRange
public static CoverageProbeDetails forRange(int probeId, CoverageProbeType type, String sourceFile, int startLine, int startColumn, int endLine, int endColumn, int 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 int 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
-