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 TypeMethodDescriptionvoid
addClass
(PackageStats.ClassStats classStats) void
addClass
(PackageStats.ClassStats classStats, boolean updatePackageStats) void
void
void
addError
(BugInstance bug) void
protected void
final int
getBugsAtPriority
(int p) getClassStatsOrNull
(String name) int
final int
void
purgeClassesThatDontMatch
(Pattern classPattern) void
void
setNumClasses
(int numClasses) void
setSize
(int size) int
size()
toString()
void
writeBugPriorities
(XMLOutput xmlOutput) Add priority attributes to a started tag.static void
writeBugPriorities
(XMLOutput xmlOutput, int[] nBugs) void
Write 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:XMLWriteable
Write this object to given XMLOutput.- Specified by:
writeXML
in 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
-