Class ClassCoverageImpl
java.lang.Object
org.jacoco.core.analysis.CoverageNodeImpl
org.jacoco.core.internal.analysis.SourceNodeImpl
org.jacoco.core.internal.analysis.ClassCoverageImpl
- All Implemented Interfaces:
IClassCoverage, ICoverageNode, ISourceNode
Implementation of
IClassCoverage.-
Nested Class Summary
Nested classes/interfaces inherited from interface ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate String[]private final Collection<IMethodCoverage> private final booleanprivate Stringprivate Stringprivate StringFields inherited from class CoverageNodeImpl
branchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounterFields inherited from interface ISourceNode
UNKNOWN_LINE -
Constructor Summary
ConstructorsConstructorDescriptionClassCoverageImpl(String name, long id, boolean noMatch) Creates a class coverage data object with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMethod(IMethodCoverage method) Add a method to this class.longgetId()Returns the identifier for this class which is the CRC64 signature of the class definition.String[]Returns the VM names of implemented/extended interfaces.Returns the methods included in this class.Returns the VM name of the package this class belongs to.Returns the VM signature of the class.Returns the optional name of the corresponding source file.Returns the VM name of the superclass.booleanReturns if the analyzed class does match the execution data provided.voidsetInterfaces(String[] interfaces) Sets the VM names of implemented/extended interfaces.voidsetSignature(String signature) Sets the VM signature of the class.voidsetSourceFileName(String sourceFileName) Sets the name of the corresponding source file for this class.voidsetSuperName(String superName) Sets the VM name of the superclass.Methods inherited from class SourceNodeImpl
ensureCapacity, getFirstLine, getLastLine, getLine, increment, incrementMethods inherited from class CoverageNodeImpl
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ICoverageNode
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopyMethods inherited from interface ISourceNode
getFirstLine, getLastLine, getLine
-
Field Details
-
id
private final long id -
noMatch
private final boolean noMatch -
methods
-
signature
-
superName
-
interfaces
-
sourceFileName
-
-
Constructor Details
-
ClassCoverageImpl
Creates a class coverage data object with the given parameters.- Parameters:
name- VM name of the classid- class identifiernoMatch-true, if class id does not match with execution data
-
-
Method Details
-
addMethod
Add a method to this class.- Parameters:
method- method data to add
-
setSignature
Sets the VM signature of the class.- Parameters:
signature- VM signature of the class (may benull)
-
setSuperName
Sets the VM name of the superclass.- Parameters:
superName- VM name of the super class (may benull, i.e.java/lang/Object)
-
setInterfaces
Sets the VM names of implemented/extended interfaces.- Parameters:
interfaces- VM names of implemented/extended interfaces
-
setSourceFileName
Sets the name of the corresponding source file for this class.- Parameters:
sourceFileName- name of the source file
-
getId
public long getId()Description copied from interface:IClassCoverageReturns the identifier for this class which is the CRC64 signature of the class definition.- Specified by:
getIdin interfaceIClassCoverage- Returns:
- class identifier
-
isNoMatch
public boolean isNoMatch()Description copied from interface:IClassCoverageReturns if the analyzed class does match the execution data provided. More precisely if execution data is available for a class with the same qualified name but with a different class id.- Specified by:
isNoMatchin interfaceIClassCoverage- Returns:
trueif this class does not match to the provided execution data.
-
getSignature
Description copied from interface:IClassCoverageReturns the VM signature of the class.- Specified by:
getSignaturein interfaceIClassCoverage- Returns:
- VM signature of the class (may be
null)
-
getSuperName
Description copied from interface:IClassCoverageReturns the VM name of the superclass.- Specified by:
getSuperNamein interfaceIClassCoverage- Returns:
- VM name of the super class (may be
null, i.e.java/lang/Object)
-
getInterfaceNames
Description copied from interface:IClassCoverageReturns the VM names of implemented/extended interfaces.- Specified by:
getInterfaceNamesin interfaceIClassCoverage- Returns:
- VM names of implemented/extended interfaces
-
getPackageName
Description copied from interface:IClassCoverageReturns the VM name of the package this class belongs to.- Specified by:
getPackageNamein interfaceIClassCoverage- Returns:
- VM name of the package
-
getSourceFileName
Description copied from interface:IClassCoverageReturns the optional name of the corresponding source file.- Specified by:
getSourceFileNamein interfaceIClassCoverage- Returns:
- name of the corresponding source file
-
getMethods
Description copied from interface:IClassCoverageReturns the methods included in this class.- Specified by:
getMethodsin interfaceIClassCoverage- Returns:
- methods of this class
-