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 org.jacoco.core.analysis.ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
private String[]
private final Collection
<IMethodCoverage> private final boolean
private String
private String
private String
Fields inherited from class org.jacoco.core.analysis.CoverageNodeImpl
branchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounter
Fields inherited from interface org.jacoco.core.analysis.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 TypeMethodDescriptionvoid
addMethod
(IMethodCoverage method) Add a method to this class.long
getId()
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.boolean
Returns if the the analyzed class does match the execution data provided.void
setInterfaces
(String[] interfaces) Sets the VM names of implemented/extended interfaces.void
setSignature
(String signature) Sets the VM signature of the class.void
setSourceFileName
(String sourceFileName) Sets the name of the corresponding source file for this class.void
setSuperName
(String superName) Sets the VM name of the superclass.Methods inherited from class org.jacoco.core.internal.analysis.SourceNodeImpl
ensureCapacity, getFirstLine, getLastLine, getLine, increment, increment
Methods inherited from class org.jacoco.core.analysis.CoverageNodeImpl
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jacoco.core.analysis.ICoverageNode
containsCode, getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy
Methods inherited from interface org.jacoco.core.analysis.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:IClassCoverage
Returns the identifier for this class which is the CRC64 signature of the class definition.- Specified by:
getId
in interfaceIClassCoverage
- Returns:
- class identifier
-
isNoMatch
public boolean isNoMatch()Description copied from interface:IClassCoverage
Returns if the 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:
isNoMatch
in interfaceIClassCoverage
- Returns:
true
if this class does not match to the provided execution data.
-
getSignature
Description copied from interface:IClassCoverage
Returns the VM signature of the class.- Specified by:
getSignature
in interfaceIClassCoverage
- Returns:
- VM signature of the class (may be
null
)
-
getSuperName
Description copied from interface:IClassCoverage
Returns the VM name of the superclass.- Specified by:
getSuperName
in interfaceIClassCoverage
- Returns:
- VM name of the super class (may be
null
, i.e.java/lang/Object
)
-
getInterfaceNames
Description copied from interface:IClassCoverage
Returns the VM names of implemented/extended interfaces.- Specified by:
getInterfaceNames
in interfaceIClassCoverage
- Returns:
- VM names of implemented/extended interfaces
-
getPackageName
Description copied from interface:IClassCoverage
Returns the VM name of the package this class belongs to.- Specified by:
getPackageName
in interfaceIClassCoverage
- Returns:
- VM name of the package
-
getSourceFileName
Description copied from interface:IClassCoverage
Returns the optional name of the corresponding source file.- Specified by:
getSourceFileName
in interfaceIClassCoverage
- Returns:
- name of the corresponding source file
-
getMethods
Description copied from interface:IClassCoverage
Returns the methods included in this class.- Specified by:
getMethods
in interfaceIClassCoverage
- Returns:
- methods of this class
-