org.jacoco.core.analysis
Interface ICounter


public interface ICounter

A counter holds the missed and the covered number of particular items like classes, methods, branches or instructions.


Nested Class Summary
static class ICounter.CounterValue
          Different values provided by a counter.
 
Field Summary
static int EMPTY
          Status flag for no items (value is 0x00).
static int FULLY_COVERED
          Status flag when all items are covered (value is 0x02).
static int NOT_COVERED
          Status flag when all items are not covered (value is 0x01).
static int PARTLY_COVERED
          Status flag when items are partly covered (value is 0x03).
 
Method Summary
 int getCoveredCount()
          Returns the count of covered items.
 double getCoveredRatio()
          Calculates the ratio of covered to total count items.
 int getMissedCount()
          Returns the count of missed items.
 double getMissedRatio()
          Calculates the ratio of missed to total count items.
 int getStatus()
          Returns the coverage status of this counter.
 int getTotalCount()
          Returns the total count of items.
 double getValue(ICounter.CounterValue value)
          Returns the counter value of the given type.
 

Field Detail

EMPTY

static final int EMPTY
Status flag for no items (value is 0x00).

See Also:
Constant Field Values

NOT_COVERED

static final int NOT_COVERED
Status flag when all items are not covered (value is 0x01).

See Also:
Constant Field Values

FULLY_COVERED

static final int FULLY_COVERED
Status flag when all items are covered (value is 0x02).

See Also:
Constant Field Values

PARTLY_COVERED

static final int PARTLY_COVERED
Status flag when items are partly covered (value is 0x03).

See Also:
Constant Field Values
Method Detail

getValue

double getValue(ICounter.CounterValue value)
Returns the counter value of the given type.

Parameters:
value - value type to return
Returns:
counter value

getTotalCount

int getTotalCount()
Returns the total count of items.

Returns:
total count of items

getCoveredCount

int getCoveredCount()
Returns the count of covered items.

Returns:
count of covered items

getMissedCount

int getMissedCount()
Returns the count of missed items.

Returns:
count of missed items

getCoveredRatio

double getCoveredRatio()
Calculates the ratio of covered to total count items. If total count items is 0 this method returns NaN.

Returns:
ratio of covered to total count items

getMissedRatio

double getMissedRatio()
Calculates the ratio of missed to total count items. If total count items is 0 this method returns NaN.

Returns:
ratio of missed to total count items

getStatus

int getStatus()
Returns the coverage status of this counter.

Returns:
status of this line
See Also:
EMPTY, NOT_COVERED, PARTLY_COVERED, FULLY_COVERED


Copyright © 2009–2024 Mountainminds GmbH & Co. KG. All rights reserved.