org.jacoco.core.internal.analysis
Class LineImpl

java.lang.Object
  extended by org.jacoco.core.internal.analysis.LineImpl
All Implemented Interfaces:
ILine

public abstract class LineImpl
extends Object
implements ILine

Implementation of ILine.


Field Summary
protected  CounterImpl branches
          branch counter
static LineImpl EMPTY
          Empty line without instructions or branches.
protected  CounterImpl instructions
          instruction counter
 
Method Summary
 boolean equals(Object obj)
           
 ICounter getBranchCounter()
          Returns the branches counter for this line.
 ICounter getInstructionCounter()
          Returns the instruction counter for this line.
 int getStatus()
          Returns the coverage status of this line, calculated from the instructions counter and branch counter.
 int hashCode()
           
abstract  LineImpl increment(ICounter instructions, ICounter branches)
          Adds the given counters to this line.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final LineImpl EMPTY
Empty line without instructions or branches.


instructions

protected CounterImpl instructions
instruction counter


branches

protected CounterImpl branches
branch counter

Method Detail

increment

public abstract LineImpl increment(ICounter instructions,
                                   ICounter branches)
Adds the given counters to this line.

Parameters:
instructions - instructions to add
branches - 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.

Specified by:
getStatus in interface ILine
Returns:
status of this line
See Also:
ICounter.EMPTY, ICounter.NOT_COVERED, ICounter.PARTLY_COVERED, ICounter.FULLY_COVERED

getInstructionCounter

public ICounter getInstructionCounter()
Description copied from interface: ILine
Returns the instruction counter for this line.

Specified by:
getInstructionCounter in interface ILine
Returns:
instruction counter

getBranchCounter

public ICounter getBranchCounter()
Description copied from interface: ILine
Returns the branches counter for this line.

Specified by:
getBranchCounter in interface ILine
Returns:
branches counter

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2009-2013 Mountainminds GmbH & Co. KG. All Rights Reserved.