Record Class ProbeData
java.lang.Object
java.lang.Record
org.ek9lang.cli.coverage.model.ProbeData
- Record Components:
sourceFile- The relative path to the source filemodule- The EK9 module nameline- The line number where this probe is locatedcovered- Whether this probe was hit during test executionprobeType- The type of probe (METHOD, BRANCH, STATEMENT)branchType- For branch probes, the specific branch type (BRANCH_TRUE, etc.), null otherwise
public record ProbeData(String sourceFile, String module, int line, boolean covered, String probeType, String branchType)
extends Record
Immutable data carrier for coverage probe information.
Decouples probe processing from CoverageRuntime API, enabling
generic processing of all probe types through a single Consumer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebranchTyperecord component.booleancovered()Returns the value of thecoveredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisBranch()Check if this is a branch probe.booleanisMethod()Check if this is a method entry probe.booleanCheck if this is a statement probe.intline()Returns the value of thelinerecord component.module()Returns the value of themodulerecord component.Returns the value of theprobeTyperecord component.Returns the value of thesourceFilerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ProbeData
public ProbeData(String sourceFile, String module, int line, boolean covered, String probeType, String branchType) Creates an instance of aProbeDatarecord class.- Parameters:
sourceFile- the value for thesourceFilerecord componentmodule- the value for themodulerecord componentline- the value for thelinerecord componentcovered- the value for thecoveredrecord componentprobeType- the value for theprobeTyperecord componentbranchType- the value for thebranchTyperecord component
-
-
Method Details
-
isMethod
public boolean isMethod()Check if this is a method entry probe. -
isBranch
public boolean isBranch()Check if this is a branch probe. -
isStatement
public boolean isStatement()Check if this is a statement probe. -
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. -
sourceFile
Returns the value of thesourceFilerecord component.- Returns:
- the value of the
sourceFilerecord component
-
module
-
line
-
covered
-
probeType
-
branchType
Returns the value of thebranchTyperecord component.- Returns:
- the value of the
branchTyperecord component
-