|
||||||||||
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 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 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 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 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
Constructor Detail |
---|
public CoverageNodeImpl(ICoverageNode.ElementType elementType, String name)
elementType
- type of the element represented by this instancename
- name of this nodeMethod 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 getBranchCounter()
ICoverageNode
getBranchCounter
in interface ICoverageNode
public ICounter getLineCounter()
ICoverageNode
getLineCounter
in interface ICoverageNode
public ICounter getComplexityCounter()
ICoverageNode
getComplexityCounter
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 boolean containsCode()
ICoverageNode
containsCode
in interface ICoverageNode
true
if this node contains code relevant for code
coveragepublic ICoverageNode getPlainCopy()
ICoverageNode
ICoverageNode
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 ICoverageNode
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |