public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
IClassCoverage
.ICoverageNode.CounterEntity, ICoverageNode.ElementType
branchCounter, classCounter, complexityCounter, instructionCounter, lineCounter, methodCounter
UNKNOWN_LINE
Constructor and Description |
---|
ClassCoverageImpl(String name,
long id,
boolean noMatch)
Creates a class coverage data object with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
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[] |
getInterfaceNames()
Returns the VM names of implemented/extended interfaces.
|
Collection<IMethodCoverage> |
getMethods()
Returns the methods included in this class.
|
String |
getPackageName()
Returns the VM name of the package this class belongs to.
|
String |
getSignature()
Returns the VM signature of the class.
|
String |
getSourceFileName()
Returns the optional name of the corresponding source file.
|
String |
getSuperName()
Returns the VM name of the superclass.
|
boolean |
isNoMatch()
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.
|
ensureCapacity, getFirstLine, getLastLine, getLine, increment, increment
getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy, increment, increment, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFirstLine, getLastLine, getLine
getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy
public ClassCoverageImpl(String name, long id, boolean noMatch)
name
- VM name of the classid
- class identifiernoMatch
- true
, if class id does not match with execution
datapublic void addMethod(IMethodCoverage method)
method
- method data to addpublic void setSignature(String signature)
signature
- VM signature of the class (may be null
)public void setSuperName(String superName)
superName
- VM name of the super class (may be null
, i.e.
java/lang/Object
)public void setInterfaces(String[] interfaces)
interfaces
- VM names of implemented/extended interfacespublic void setSourceFileName(String sourceFileName)
sourceFileName
- name of the source filepublic long getId()
IClassCoverage
getId
in interface IClassCoverage
public boolean isNoMatch()
IClassCoverage
isNoMatch
in interface IClassCoverage
true
if this class does not match to the provided
execution data.public String getSignature()
IClassCoverage
getSignature
in interface IClassCoverage
null
)public String getSuperName()
IClassCoverage
getSuperName
in interface IClassCoverage
null
, i.e.
java/lang/Object
)public String[] getInterfaceNames()
IClassCoverage
getInterfaceNames
in interface IClassCoverage
public String getPackageName()
IClassCoverage
getPackageName
in interface IClassCoverage
public String getSourceFileName()
IClassCoverage
getSourceFileName
in interface IClassCoverage
public Collection<IMethodCoverage> getMethods()
IClassCoverage
getMethods
in interface IClassCoverage
Copyright © 2018. All rights reserved.