net.sourceforge.cobertura.coveragedata
Class SourceFileData
java.lang.Object
net.sourceforge.cobertura.coveragedata.CoverageDataContainer
net.sourceforge.cobertura.coveragedata.SourceFileData
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, CoverageData, HasBeenInstrumented
public class SourceFileData
- extends CoverageDataContainer
- implements java.lang.Comparable, HasBeenInstrumented
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
name
private java.lang.String name
SourceFileData
public SourceFileData(java.lang.String name)
- Parameters:
name
- In the format, "net/sourceforge/cobertura/coveragedata/SourceFileData.java"
addClassData
public void addClassData(ClassData classData)
compareTo
public int compareTo(java.lang.Object o)
- This is required because we implement Comparable.
- Specified by:
compareTo
in interface java.lang.Comparable
contains
public boolean contains(java.lang.String name)
containsInstrumentationInfo
public boolean containsInstrumentationInfo()
equals
public boolean equals(java.lang.Object obj)
- Returns true if the given object is an instance of the
SourceFileData class, and it contains the same data as this
class.
- Overrides:
equals
in class CoverageDataContainer
- Parameters:
obj
- An object to test for equality.
- Returns:
- True if the objects are equal.
getBaseName
public java.lang.String getBaseName()
getClasses
public java.util.SortedSet getClasses()
getLineCoverage
public LineData getLineCoverage(int lineNumber)
getName
public java.lang.String getName()
getNormalizedName
public java.lang.String getNormalizedName()
- Returns:
- The name of this source file without the file extension
in the format
"net.sourceforge.cobertura.coveragedata.SourceFileData"
getPackageName
public java.lang.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()
- Description copied from class:
CoverageDataContainer
- It is highly recommended that classes extending this
class override this hashCode method and generate a more
effective hash code.
- Overrides:
hashCode
in class CoverageDataContainer
isValidSourceLineNumber
public boolean isValidSourceLineNumber(int lineNumber)