Package edu.umd.cs.findbugs
Class PackageStats
java.lang.Object
edu.umd.cs.findbugs.PackageStats
- All Implemented Interfaces:
XMLWriteable
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPackageStats(String packageName) PackageStats(String packageName, int numClasses, int size) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClass(PackageStats.ClassStats classStats) voidaddClass(PackageStats.ClassStats classStats, boolean updatePackageStats) voidvoidvoidaddError(BugInstance bug) voidprotected voidfinal intgetBugsAtPriority(int p) getClassStatsOrNull(String name) intfinal intvoidpurgeClassesThatDontMatch(Pattern classPattern) voidvoidsetNumClasses(int numClasses) voidsetSize(int size) intsize()toString()voidwriteBugPriorities(XMLOutput xmlOutput) Add priority attributes to a started tag.static voidwriteBugPriorities(XMLOutput xmlOutput, int[] nBugs) voidWrite this object to given XMLOutput.
-
Field Details
-
ELEMENT_NAME
- See Also:
-
ALL_ERRORS
public static final int ALL_ERRORS- See Also:
-
nBugs
protected int[] nBugs
-
-
Constructor Details
-
PackageStats
-
PackageStats
-
-
Method Details
-
toString
-
getClassStats
-
size
public int size() -
setSize
public void setSize(int size) -
getClassStatsOrNull
-
addError
-
addClass
-
addClass
-
addClass
-
addClass
-
getPackageName
-
getNumClasses
public int getNumClasses() -
setNumClasses
public void setNumClasses(int numClasses) -
writeXML
Description copied from interface:XMLWriteableWrite this object to given XMLOutput.- Specified by:
writeXMLin interfaceXMLWriteable- Parameters:
xmlOutput- the XMLOutput for the document- Throws:
IOException
-
getSortedClassStats
-
recomputeFromClassStats
public void recomputeFromClassStats() -
clearBugCounts
public void clearBugCounts() -
purgeClassesThatDontMatch
- Parameters:
classPattern-
-
ensureNonnullBugCounts
protected void ensureNonnullBugCounts() -
getTotalBugs
public final int getTotalBugs() -
getBugsAtPriority
public final int getBugsAtPriority(int p) -
writeBugPriorities
Add priority attributes to a started tag. Each priority at offset n, where n > 0, is output using attribute priority_n if the value at offset n is greater than zero.- Parameters:
xmlOutput- an output stream for which startTag has been called but stopTag has not.- Throws:
IOException
-
writeBugPriorities
- Throws:
IOException
-