Class LineImpl
java.lang.Object
org.jacoco.core.internal.analysis.LineImpl
- All Implemented Interfaces:
ILine
- Direct Known Subclasses:
LineImpl.Fix
,LineImpl.Var
Implementation of
ILine
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Immutable version.private static final class
Mutable version. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CounterImpl
branch counterstatic final LineImpl
Empty line without instructions or branches.protected CounterImpl
instruction counterprivate static final int
Max branch counter value for which singletons are createdprivate static final int
Max instruction counter value for which singletons are createdprivate static final LineImpl[][][][]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the branches counter for this line.private static LineImpl
getInstance
(CounterImpl instructions, CounterImpl branches) Returns the instruction counter for this line.int
Returns the coverage status of this line, calculated from the instructions counter and branch counter.int
hashCode()
abstract LineImpl
Adds the given counters to this line.
-
Field Details
-
SINGLETON_INS_LIMIT
private static final int SINGLETON_INS_LIMITMax instruction counter value for which singletons are created- See Also:
-
SINGLETON_BRA_LIMIT
private static final int SINGLETON_BRA_LIMITMax branch counter value for which singletons are created- See Also:
-
SINGLETONS
-
EMPTY
Empty line without instructions or branches. -
instructions
instruction counter -
branches
branch counter
-
-
Constructor Details
-
LineImpl
-
-
Method Details
-
getInstance
-
increment
Adds the given counters to this line.- Parameters:
instructions
- instructions to addbranches
- branches to add- Returns:
- instance with new counter values
-
getStatus
public int getStatus()Description copied from interface:ILine
Returns the coverage status of this line, calculated from the instructions counter and branch counter. -
getInstructionCounter
Description copied from interface:ILine
Returns the instruction counter for this line.- Specified by:
getInstructionCounter
in interfaceILine
- Returns:
- instruction counter
-
getBranchCounter
Description copied from interface:ILine
Returns the branches counter for this line.- Specified by:
getBranchCounter
in interfaceILine
- Returns:
- branches counter
-
hashCode
public int hashCode() -
equals
-