org.jacoco.core.internal.analysis
Class ClassCoverageImpl

java.lang.Object
  extended by org.jacoco.core.analysis.CoverageNodeImpl
      extended by org.jacoco.core.internal.analysis.SourceNodeImpl
          extended by org.jacoco.core.internal.analysis.ClassCoverageImpl
All Implemented Interfaces:
IClassCoverage, ICoverageNode, ISourceNode

public class ClassCoverageImpl
extends SourceNodeImpl
implements IClassCoverage

Implementation of IClassCoverage.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jacoco.core.analysis.ICoverageNode
ICoverageNode.CounterEntity, ICoverageNode.ElementType
 
Field Summary
 
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
ClassCoverageImpl(String name, long id, boolean noMatch)
          Creates a class coverage data object with the given parameters.
 
Method Summary
 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.
 
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
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.ISourceNode
getFirstLine, getLastLine, getLine
 
Methods inherited from interface org.jacoco.core.analysis.ICoverageNode
getBranchCounter, getClassCounter, getComplexityCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getMethodCounter, getName, getPlainCopy
 

Constructor Detail

ClassCoverageImpl

public ClassCoverageImpl(String name,
                         long id,
                         boolean noMatch)
Creates a class coverage data object with the given parameters.

Parameters:
name - VM name of the class
id - class identifier
noMatch - true, if class id does not match with execution data
Method Detail

addMethod

public void addMethod(IMethodCoverage method)
Add a method to this class.

Parameters:
method - method data to add

setSignature

public void setSignature(String signature)
Sets the VM signature of the class.

Parameters:
signature - VM signature of the class (may be null)

setSuperName

public void setSuperName(String superName)
Sets the VM name of the superclass.

Parameters:
superName - VM name of the super class (may be null, i.e. java/lang/Object)

setInterfaces

public void setInterfaces(String[] interfaces)
Sets the VM names of implemented/extended interfaces.

Parameters:
interfaces - VM names of implemented/extended interfaces

setSourceFileName

public void setSourceFileName(String sourceFileName)
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 interface IClassCoverage
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 interface IClassCoverage
Returns:
true if this class does not match to the provided execution data.

getSignature

public String getSignature()
Description copied from interface: IClassCoverage
Returns the VM signature of the class.

Specified by:
getSignature in interface IClassCoverage
Returns:
VM signature of the class (may be null)

getSuperName

public String getSuperName()
Description copied from interface: IClassCoverage
Returns the VM name of the superclass.

Specified by:
getSuperName in interface IClassCoverage
Returns:
VM name of the super class (may be null, i.e. java/lang/Object)

getInterfaceNames

public String[] getInterfaceNames()
Description copied from interface: IClassCoverage
Returns the VM names of implemented/extended interfaces.

Specified by:
getInterfaceNames in interface IClassCoverage
Returns:
VM names of implemented/extended interfaces

getPackageName

public String getPackageName()
Description copied from interface: IClassCoverage
Returns the VM name of the package this class belongs to.

Specified by:
getPackageName in interface IClassCoverage
Returns:
VM name of the package

getSourceFileName

public String getSourceFileName()
Description copied from interface: IClassCoverage
Returns the optional name of the corresponding source file.

Specified by:
getSourceFileName in interface IClassCoverage
Returns:
name of the corresponding source file

getMethods

public Collection<IMethodCoverage> getMethods()
Description copied from interface: IClassCoverage
Returns the methods included in this class.

Specified by:
getMethods in interface IClassCoverage
Returns:
methods of this class


Copyright © 2009-2016 Mountainminds GmbH & Co. KG. All Rights Reserved.