|
||||||||||
| 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 |
branchCounter
Counter for branches. |
protected CounterImpl |
classCounter
Counter for classes. |
protected CounterImpl |
complexityCounter
Counter for complexity. |
protected CounterImpl |
instructionCounter
Counter for instructions. |
protected CounterImpl |
lineCounter
Counter for lines |
protected CounterImpl |
methodCounter
Counter for methods. |
| Constructor Summary | |
|---|---|
CoverageNodeImpl(ICoverageNode.ElementType elementType,
String name)
Creates a new coverage data node. |
|
| Method Summary | |
|---|---|
boolean |
containsCode()
Checks whether this node contains code relevant for code coverage. |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected CounterImpl branchCounter
protected CounterImpl instructionCounter
protected CounterImpl lineCounter
protected CounterImpl complexityCounter
protected CounterImpl methodCounter
protected CounterImpl classCounter
| Constructor Detail |
|---|
public CoverageNodeImpl(ICoverageNode.ElementType elementType,
String name)
elementType - type of the element represented by this instancename - name of this node| Method 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 ICoverageNodepublic String getName()
ICoverageNode
getName in interface ICoverageNodepublic ICounter getInstructionCounter()
ICoverageNode
getInstructionCounter in interface ICoverageNodepublic ICounter getBranchCounter()
ICoverageNode
getBranchCounter in interface ICoverageNodepublic ICounter getLineCounter()
ICoverageNode
getLineCounter in interface ICoverageNodepublic ICounter getComplexityCounter()
ICoverageNode
getComplexityCounter in interface ICoverageNodepublic ICounter getMethodCounter()
ICoverageNode
getMethodCounter in interface ICoverageNodepublic ICounter getClassCounter()
ICoverageNode
getClassCounter in interface ICoverageNodepublic ICounter getCounter(ICoverageNode.CounterEntity entity)
ICoverageNode
getCounter in interface ICoverageNodeentity - entity we're we want to have the counter for
public boolean containsCode()
ICoverageNode
containsCode in interface ICoverageNodetrue if this node contains code relevant for code
coveragepublic 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 ICoverageNodepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||