|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jacoco.core.analysis.CoverageNodeImpl
public class CoverageNodeImpl
Base implementation for coverage data nodes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jacoco.core.analysis.ICoverageNode |
---|
ICoverageNode.CounterEntity, ICoverageNode.ElementType |
Field Summary | |
---|---|
protected CounterImpl |
blockCounter
Counter for blocks. |
protected CounterImpl |
classCounter
Counter for classes. |
protected CounterImpl |
instructionCounter
Counter for instructions. |
protected CounterImpl |
lineCounter
Counter for lines, if this element does not have lines. |
protected LinesImpl |
lines
Line information if this element has lines. |
protected CounterImpl |
methodCounter
Counter for methods. |
Constructor Summary | |
---|---|
CoverageNodeImpl(ICoverageNode.ElementType elementType,
String name,
boolean hasLines)
Creates a new coverage data node. |
Method Summary | |
---|---|
ICounter |
getBlockCounter()
Returns the counter for blocks. |
ICounter |
getClassCounter()
Returns the counter for classes. |
ICounter |
getCounter(ICoverageNode.CounterEntity entity)
Generic access to the the counters. |
ICoverageNode.ElementType |
getElementType()
Returns the type of element represented by this node. |
ICounter |
getInstructionCounter()
Returns the counter for byte code instructions. |
ICounter |
getLineCounter()
Returns the counter for lines. |
ILines |
getLines()
Returns the line coverage information if this node represents a source file or a part of a source file. |
ICounter |
getMethodCounter()
Returns the counter for methods. |
String |
getName()
Returns the name of this node. |
ICoverageNode |
getPlainCopy()
Creates a plain copy of this node. |
void |
increment(Collection<? extends ICoverageNode> children)
Increments the counters by the values given by the collection of elements. |
void |
increment(ICoverageNode child)
Increments the counters by the values given by another element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CounterImpl blockCounter
protected CounterImpl instructionCounter
protected CounterImpl lineCounter
protected CounterImpl methodCounter
protected CounterImpl classCounter
protected final LinesImpl lines
Constructor Detail |
---|
public CoverageNodeImpl(ICoverageNode.ElementType elementType, String name, boolean hasLines)
elementType
- type of the element represented by this instancename
- name of this nodehasLines
- true
id this element has source linesMethod Detail |
---|
public void increment(ICoverageNode child)
child
- counters to addpublic void increment(Collection<? extends ICoverageNode> children)
children
- list of nodes, which counters will be added to this nodepublic ICoverageNode.ElementType getElementType()
ICoverageNode
getElementType
in interface ICoverageNode
public String getName()
ICoverageNode
getName
in interface ICoverageNode
public ICounter getInstructionCounter()
ICoverageNode
getInstructionCounter
in interface ICoverageNode
public ICounter getBlockCounter()
ICoverageNode
getBlockCounter
in interface ICoverageNode
public ICounter getLineCounter()
ICoverageNode
getLineCounter
in interface ICoverageNode
public ICounter getMethodCounter()
ICoverageNode
getMethodCounter
in interface ICoverageNode
public ICounter getClassCounter()
ICoverageNode
getClassCounter
in interface ICoverageNode
public ICounter getCounter(ICoverageNode.CounterEntity entity)
ICoverageNode
getCounter
in interface ICoverageNode
entity
- entity we're we want to have the counter for
public ILines getLines()
ICoverageNode
getLines
in interface ICoverageNode
null
public ICoverageNode getPlainCopy()
ICoverageNode
ICoverageNode
implementations may contain heavy data structures, the copy returned by
this method is reduced to the counters only. This helps tp save memory
while processing huge structures.
getPlainCopy
in interface ICoverageNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |