public class ProjectStats extends java.lang.Object implements XMLWriteable, java.lang.Cloneable
Constructor and Description |
---|
ProjectStats()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addBug(BugInstance bug)
Called when a bug is reported.
|
void |
addClass(java.lang.String className,
java.lang.String sourceFile,
boolean isInterface,
int size)
Report that a class has been analyzed.
|
void |
addClass(java.lang.String className,
java.lang.String sourceFile,
boolean isInterface,
int size,
boolean updatePackageStats)
Report that a class has been analyzed.
|
void |
addStats(ProjectStats stats2) |
void |
clearBugCounts()
Clear bug counts
|
ProjectStats |
clone() |
void |
computeFileStats(BugCollection bugs) |
Footprint |
getBaseFootprint() |
int |
getBugsOfPriority(int priority) |
PackageStats.ClassStats |
getClassStats(java.lang.String className)
Report that a class has been analyzed.
|
int |
getCodeSize() |
java.util.Map<java.lang.String,java.lang.String> |
getFileHashes(BugCollection bugs) |
int |
getNumClasses()
Get the number of classes analyzed.
|
java.util.Collection<PackageStats> |
getPackageStats() |
Profiler |
getProfiler() |
int |
getReferencedClasses() |
int |
getTotalBugs() |
boolean |
hasClassStats() |
boolean |
hasPackageStats() |
void |
purgeClassesThatDontMatch(java.util.regex.Pattern classPattern) |
void |
purgeClassStats() |
void |
purgePackageStats() |
void |
putPackageStats(java.lang.String packageName,
int numClasses,
int size) |
void |
recomputeFromComponents() |
void |
reportSummary(java.io.OutputStream out)
Report statistics as an XML document to given output stream.
|
void |
setReferencedClasses(int size) |
void |
setTimestamp(long timestamp) |
void |
setTimestamp(java.lang.String timestamp)
Set the timestamp for this analysis run.
|
void |
setTotalClasses(int totalClasses) |
void |
setTotalSize(int totalSize) |
void |
setVMVersion(java.lang.String vm_version) |
java.lang.String |
toString() |
void |
transformSummaryToHTML(java.io.Writer htmlWriter)
Transform summary information to HTML.
|
void |
writeXML(XMLOutput xmlOutput)
Output as XML.
|
void |
writeXML(XMLOutput xmlOutput,
boolean withMessages)
Output as XML.
|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasClassStats()
public boolean hasPackageStats()
public ProjectStats clone()
clone
in class java.lang.Object
public int getCodeSize()
public int getTotalBugs()
public int getBugsOfPriority(int priority)
public void setTimestamp(java.lang.String timestamp) throws java.text.ParseException
timestamp
- the time of the analysis run this ProjectStats represents, as
previously reported by writeXML.java.text.ParseException
public void setTimestamp(long timestamp)
public void setVMVersion(java.lang.String vm_version)
public int getNumClasses()
public Footprint getBaseFootprint()
public void addClass(@DottedClassName java.lang.String className, @CheckForNull java.lang.String sourceFile, boolean isInterface, int size)
className
- the full name of the classsourceFile
- TODOisInterface
- true if the class is an interfacesize
- a normalized class size value; see
detect/FindBugsSummaryStats.public void addClass(@DottedClassName java.lang.String className, @CheckForNull java.lang.String sourceFile, boolean isInterface, int size, boolean updatePackageStats)
className
- the full name of the classsourceFile
- TODOisInterface
- true if the class is an interfacesize
- a normalized class size value; see
detect/FindBugsSummaryStats.updatePackageStats
- TODO@CheckForNull public PackageStats.ClassStats getClassStats(@DottedClassName java.lang.String className)
className
- the full name of the classpublic void addBug(BugInstance bug)
public void clearBugCounts()
public void purgeClassesThatDontMatch(java.util.regex.Pattern classPattern)
public void purgeClassStats()
public void purgePackageStats()
public void recomputeFromComponents()
public void computeFileStats(BugCollection bugs)
public void writeXML(XMLOutput xmlOutput) throws java.io.IOException
writeXML
in interface XMLWriteable
xmlOutput
- the XMLOutput for the documentjava.io.IOException
public void writeXML(XMLOutput xmlOutput, boolean withMessages) throws java.io.IOException
java.io.IOException
public java.util.Map<java.lang.String,java.lang.String> getFileHashes(BugCollection bugs)
public void reportSummary(@WillClose java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public void transformSummaryToHTML(java.io.Writer htmlWriter) throws java.io.IOException, javax.xml.transform.TransformerException
htmlWriter
- the Writer to write the HTML output tojava.io.IOException
javax.xml.transform.TransformerException
public java.util.Collection<PackageStats> getPackageStats()
public void putPackageStats(java.lang.String packageName, int numClasses, int size)
public void addStats(ProjectStats stats2)
stats2
- public void setReferencedClasses(int size)
size
- public int getReferencedClasses()
public Profiler getProfiler()
public void setTotalClasses(int totalClasses)
public void setTotalSize(int totalSize)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.