net.sourceforge.cobertura.coveragedata

Class SourceFileData

Implemented Interfaces:
Comparable, HasBeenInstrumented

public class SourceFileData
extends CoverageDataContainer
implements Comparable, HasBeenInstrumented

Field Summary

private String
name
private static long
serialVersionUID

Constructor Summary

SourceFileData(String name)

Method Summary

void
addClassData(ClassData classData)
int
compareTo(Object o)
This is required because we implement Comparable.
boolean
contains(String name)
boolean
containsInstrumentationInfo()
boolean
equals(Object obj)
Returns true if the given object is an instance of the SourceFileData class, and it contains the same data as this class.
String
getBaseName()
SortedSet
getClasses()
long
getHitCount(int lineNumber)
String
getName()
String
getNormalizedName()
String
getPackageName()
int
hashCode()
boolean
isValidSourceLineNumber(int lineNumber)

Field Details

name

private String name

serialVersionUID

private static final long serialVersionUID
Field Value:
3L

Constructor Details

SourceFileData

public SourceFileData(String name)
Parameters:
name - In the format, "net/sourceforge/cobertura/coveragedata/SourceFileData.java"

Method Details

addClassData

public void addClassData(ClassData classData)

compareTo

public int compareTo(Object o)
This is required because we implement Comparable.

contains

public boolean contains(String name)

containsInstrumentationInfo

public boolean containsInstrumentationInfo()

equals

public boolean equals(Object obj)
Returns true if the given object is an instance of the SourceFileData class, and it contains the same data as this class.

getBaseName

public String getBaseName()

getClasses

public SortedSet getClasses()

getHitCount

public long getHitCount(int lineNumber)

getName

public String getName()

getNormalizedName

public String getNormalizedName()
Returns:
The name of this source file without the file extension in the format "net.sourceforge.cobertura.coveragedata.SourceFileData"

getPackageName

public String getPackageName()
Returns:
The name of the package that this source file is in. In the format "net.sourceforge.cobertura.coveragedata"

hashCode

public int hashCode()

isValidSourceLineNumber

public boolean isValidSourceLineNumber(int lineNumber)