public class ProjectStats extends Object implements XMLWriteable, Cloneable
| Constructor and Description |
|---|
ProjectStats()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBug(BugInstance bug)
Called when a bug is reported.
|
void |
addClass(String className,
String sourceFile,
boolean isInterface,
int size)
Report that a class has been analyzed.
|
void |
addClass(String className,
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(String className)
Report that a class has been analyzed.
|
int |
getCodeSize() |
Map<String,String> |
getFileHashes(BugCollection bugs) |
int |
getNumClasses()
Get the number of classes analyzed.
|
Collection<PackageStats> |
getPackageStats() |
Profiler |
getProfiler() |
int |
getReferencedClasses() |
int |
getTotalBugs() |
boolean |
hasClassStats() |
boolean |
hasPackageStats() |
void |
purgeClassesThatDontMatch(Pattern classPattern) |
void |
purgeClassStats() |
void |
purgePackageStats() |
void |
putPackageStats(String packageName,
int numClasses,
int size) |
void |
recomputeFromComponents() |
void |
reportSummary(OutputStream out)
Report statistics as an XML document to given output stream.
|
void |
setReferencedClasses(int size) |
void |
setTimestamp(long timestamp) |
void |
setTimestamp(String timestamp)
Set the timestamp for this analysis run.
|
void |
setTotalClasses(int totalClasses) |
void |
setTotalSize(int totalSize) |
void |
setVMVersion(String vm_version) |
String |
toString() |
void |
transformSummaryToHTML(Writer htmlWriter)
Transform summary information to HTML.
|
void |
writeXML(XMLOutput xmlOutput)
Output as XML.
|
void |
writeXML(XMLOutput xmlOutput,
boolean withMessages)
Output as XML.
|
public boolean hasClassStats()
public boolean hasPackageStats()
public ProjectStats clone()
public int getCodeSize()
public int getTotalBugs()
public int getBugsOfPriority(int priority)
public void setTimestamp(String timestamp) throws ParseException
timestamp - the time of the analysis run this ProjectStats represents, as
previously reported by writeXML.ParseExceptionpublic void setTimestamp(long timestamp)
public void setVMVersion(String vm_version)
public int getNumClasses()
public Footprint getBaseFootprint()
public void addClass(@DottedClassName String className, @CheckForNull 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 String className, @CheckForNull 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 String className)
className - the full name of the classpublic void addBug(BugInstance bug)
public void clearBugCounts()
public void purgeClassesThatDontMatch(Pattern classPattern)
public void purgeClassStats()
public void purgePackageStats()
public void recomputeFromComponents()
public void computeFileStats(BugCollection bugs)
public void writeXML(XMLOutput xmlOutput) throws IOException
writeXML in interface XMLWriteablexmlOutput - the XMLOutput for the documentIOExceptionpublic void writeXML(XMLOutput xmlOutput, boolean withMessages) throws IOException
IOExceptionpublic Map<String,String> getFileHashes(BugCollection bugs)
public void reportSummary(@WillClose OutputStream out) throws IOException
IOExceptionpublic void transformSummaryToHTML(Writer htmlWriter) throws IOException, TransformerException
htmlWriter - the Writer to write the HTML output toIOExceptionTransformerExceptionpublic Collection<PackageStats> getPackageStats()
public void putPackageStats(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)
Copyright © 2003–2015. All rights reserved.