public class CoverageNodeImpl extends Object implements ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType| Modifier and Type | Field and Description |
|---|---|
protected org.jacoco.core.internal.analysis.CounterImpl |
branchCounter
Counter for branches.
|
protected org.jacoco.core.internal.analysis.CounterImpl |
classCounter
Counter for classes.
|
protected org.jacoco.core.internal.analysis.CounterImpl |
complexityCounter
Counter for complexity.
|
protected org.jacoco.core.internal.analysis.CounterImpl |
instructionCounter
Counter for instructions.
|
protected org.jacoco.core.internal.analysis.CounterImpl |
lineCounter
Counter for lines
|
protected org.jacoco.core.internal.analysis.CounterImpl |
methodCounter
Counter for methods.
|
| Constructor and Description |
|---|
CoverageNodeImpl(ICoverageNode.ElementType elementType,
String name)
Creates a new coverage data node.
|
| Modifier and Type | Method and Description |
|---|---|
ICounter |
getBranchCounter()
Returns the counter for branches.
|
ICounter |
getClassCounter()
Returns the counter for classes.
|
ICounter |
getComplexityCounter()
Returns the counter for cyclomatic complexity.
|
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.
|
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.
|
String |
toString() |
protected org.jacoco.core.internal.analysis.CounterImpl branchCounter
protected org.jacoco.core.internal.analysis.CounterImpl instructionCounter
protected org.jacoco.core.internal.analysis.CounterImpl lineCounter
protected org.jacoco.core.internal.analysis.CounterImpl complexityCounter
protected org.jacoco.core.internal.analysis.CounterImpl methodCounter
protected org.jacoco.core.internal.analysis.CounterImpl classCounter
public CoverageNodeImpl(ICoverageNode.ElementType elementType, String name)
elementType - type of the element represented by this instancename - name of this nodepublic 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()
ICoverageNodegetElementType in interface ICoverageNodepublic String getName()
ICoverageNodegetName in interface ICoverageNodepublic ICounter getInstructionCounter()
ICoverageNodegetInstructionCounter in interface ICoverageNodepublic ICounter getBranchCounter()
ICoverageNodegetBranchCounter in interface ICoverageNodepublic ICounter getLineCounter()
ICoverageNodegetLineCounter in interface ICoverageNodepublic ICounter getComplexityCounter()
ICoverageNodegetComplexityCounter in interface ICoverageNodepublic ICounter getMethodCounter()
ICoverageNodegetMethodCounter in interface ICoverageNodepublic ICounter getClassCounter()
ICoverageNodegetClassCounter in interface ICoverageNodepublic ICounter getCounter(ICoverageNode.CounterEntity entity)
ICoverageNodegetCounter in interface ICoverageNodeentity - entity we're we want to have the counter forpublic ICoverageNode getPlainCopy()
ICoverageNodeICoverageNode
implementations may contain heavy data structures, the copy returned by
this method is reduced to the counters only. This helps to save memory
while processing huge structures.getPlainCopy in interface ICoverageNodeCopyright © 2009-2015 Mountainminds GmbH & Co. KG. All Rights Reserved.