org.jacoco.core.analysis
Class ClassCoverage

java.lang.Object
  extended by org.jacoco.core.analysis.CoverageNodeImpl
      extended by org.jacoco.core.analysis.ClassCoverage
All Implemented Interfaces:
ICoverageNode

public class ClassCoverage
extends CoverageNodeImpl

Coverage data of a single class.

Version:
0.4.1.20101007204400
Author:
Marc R. Hoffmann

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
blockCounter, classCounter, instructionCounter, lineCounter, lines, methodCounter
 
Constructor Summary
ClassCoverage(String name, long id, String signature, String superName, String[] interfaces, String sourceFileName, Collection<MethodCoverage> methods)
          Creates a class coverage data object with the given parameters.
 
Method Summary
 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<MethodCoverage> 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.
 
Methods inherited from class org.jacoco.core.analysis.CoverageNodeImpl
getBlockCounter, getClassCounter, getCounter, getElementType, getInstructionCounter, getLineCounter, getLines, getMethodCounter, getName, getPlainCopy, increment, increment, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassCoverage

public ClassCoverage(String name,
                     long id,
                     String signature,
                     String superName,
                     String[] interfaces,
                     String sourceFileName,
                     Collection<MethodCoverage> methods)
Creates a class coverage data object with the given parameters.

Parameters:
name - vm name of the class
id - class identifier
signature - vm signature of the class
superName - vm name of the superclass of this class
interfaces - vm names of interfaces of this class
sourceFileName - optional name of the corresponding source file
methods - contained methods
Method Detail

getId

public long getId()
Returns the identifier for this class which is the CRC64 signature of the class definition.

Returns:
class identifier

getSignature

public String getSignature()
Returns the VM signature of the class.

Returns:
VM signature of the class (may be null)

getSuperName

public String getSuperName()
Returns the VM name of the superclass.

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

getInterfaceNames

public String[] getInterfaceNames()
Returns the VM names of implemented/extended interfaces

Returns:
VM names of implemented/extended interfaces

getPackageName

public String getPackageName()
Returns the VM name of the package this class belongs to.

Returns:
VM name of the package

getSourceFileName

public String getSourceFileName()
Returns the optional name of the corresponding source file.

Returns:
name of the corresponding source file

getMethods

public Collection<MethodCoverage> getMethods()
Returns the methods included in this class.

Returns:
methods of this class