Record Class CoverageFunctionDetails
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.CoverageFunctionDetails
- Record Components:
functionId- Globally unique function identifier (FNV-1a 64-bit hash)fullyQualifiedName- Full name including module (e.g., "mymodule::MyClass._add")simpleName- Simple function/method name (e.g., "_add")sourceFile- Source file containing this functionstartLine- Starting line of the function definitionsignatureEndLine- Last line of the function signature (including return declaration)endLine- Ending line of the function definition (body end)probeCount- Number of probes within this functionentryProbeId- GUID of the FUNCTION_ENTRY probe for this functionmetrics- Code quality metrics (complexity, cognitive, nesting, etc.)
public record CoverageFunctionDetails(long functionId, String fullyQualifiedName, String simpleName, String sourceFile, int startLine, int signatureEndLine, int endLine, int probeCount, long entryProbeId, FunctionMetrics metrics)
extends Record
Represents coverage information for a single function/method.
Used for function-level coverage reporting and mapping probes back to their containing functions. Now includes code quality metrics collected during Phase 5 for integrated coverage + quality reports.
Function IDs are globally unique GUIDs generated from a deterministic hash of the function's location context. This ensures uniqueness across all source files without coordination during parallel compilation.
-
Constructor Summary
ConstructorsConstructorDescriptionCoverageFunctionDetails(long functionId, String fullyQualifiedName, String simpleName, String sourceFile, int startLine, int signatureEndLine, int endLine, int probeCount, long entryProbeId, FunctionMetrics metrics) Canonical constructor with null-safety for metrics. -
Method Summary
Modifier and TypeMethodDescriptionintendLine()Returns the value of theendLinerecord component.longReturns the value of theentryProbeIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefullyQualifiedNamerecord component.longReturns the value of thefunctionIdrecord component.final inthashCode()Returns a hash code value for this object.booleanCheck if this function has high complexity.booleanCheck if this function has any coverage probes.intGet the line count for this function.metrics()Returns the value of themetricsrecord component.booleanCheck if this function needs quality attention based on metrics.intReturns the value of theprobeCountrecord component.Get severity level for display ("critical", "warning", or "ok").intReturns the value of thesignatureEndLinerecord component.Returns the value of thesimpleNamerecord component.Returns the value of thesourceFilerecord component.intReturns the value of thestartLinerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
CoverageFunctionDetails
public CoverageFunctionDetails(long functionId, String fullyQualifiedName, String simpleName, String sourceFile, int startLine, int signatureEndLine, int endLine, int probeCount, long entryProbeId, FunctionMetrics metrics) Canonical constructor with null-safety for metrics.
-
-
Method Details
-
hasProbes
public boolean hasProbes()Check if this function has any coverage probes. -
lineCount
public int lineCount()Get the line count for this function. -
needsQualityAttention
public boolean needsQualityAttention()Check if this function needs quality attention based on metrics.- Returns:
- true if complexity metrics exceed thresholds
-
hasHighComplexity
public boolean hasHighComplexity()Check if this function has high complexity.- Returns:
- true if cyclomatic or cognitive complexity is high
-
severityLevel
Get severity level for display ("critical", "warning", or "ok").- Returns:
- severity level string
-
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. -
functionId
public long functionId()Returns the value of thefunctionIdrecord component.- Returns:
- the value of the
functionIdrecord component
-
fullyQualifiedName
Returns the value of thefullyQualifiedNamerecord component.- Returns:
- the value of the
fullyQualifiedNamerecord component
-
simpleName
Returns the value of thesimpleNamerecord component.- Returns:
- the value of the
simpleNamerecord component
-
sourceFile
Returns the value of thesourceFilerecord component.- Returns:
- the value of the
sourceFilerecord component
-
startLine
-
signatureEndLine
public int signatureEndLine()Returns the value of thesignatureEndLinerecord component.- Returns:
- the value of the
signatureEndLinerecord component
-
endLine
-
probeCount
public int probeCount()Returns the value of theprobeCountrecord component.- Returns:
- the value of the
probeCountrecord component
-
entryProbeId
public long entryProbeId()Returns the value of theentryProbeIdrecord component.- Returns:
- the value of the
entryProbeIdrecord component
-
metrics
-