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:
$Revision: $
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, String signature, String superName, String[] interfaces, String sourceFileName, Collection<MethodCoverage> methods)
          Creates a class coverage data object with the given parameters.
 
Method Summary
 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 getSimpleName()
          Returns the VM name of the class without the package prefix.
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassCoverage

public ClassCoverage(String name,
                     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
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

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

getSimpleName

public String getSimpleName()
Returns the VM name of the class without the package prefix.

Returns:
VM name of the class without 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