public class PackageStats extends java.lang.Object implements XMLWriteable
Modifier and Type | Class and Description |
---|---|
static class |
PackageStats.ClassStats |
Modifier and Type | Field and Description |
---|---|
static int |
ALL_ERRORS |
static java.lang.String |
ELEMENT_NAME |
protected int[] |
nBugs |
Constructor and Description |
---|
PackageStats(java.lang.String packageName) |
PackageStats(java.lang.String packageName,
int numClasses,
int size) |
Modifier and Type | Method and Description |
---|---|
void |
addClass(PackageStats.ClassStats classStats) |
void |
addClass(PackageStats.ClassStats classStats,
boolean updatePackageStats) |
void |
addClass(java.lang.String name,
java.lang.String sourceFile,
boolean isInterface,
int size) |
void |
addClass(java.lang.String name,
java.lang.String sourceFile,
boolean isInterface,
int size,
boolean updatePackageStats) |
void |
addError(BugInstance bug) |
void |
clearBugCounts() |
protected void |
ensureNonnullBugCounts() |
int |
getBugsAtPriority(int p) |
java.util.Collection<PackageStats.ClassStats> |
getClassStats() |
PackageStats.ClassStats |
getClassStatsOrNull(java.lang.String name) |
int |
getNumClasses() |
java.lang.String |
getPackageName() |
java.util.Collection<PackageStats.ClassStats> |
getSortedClassStats() |
int |
getTotalBugs() |
void |
purgeClassesThatDontMatch(java.util.regex.Pattern classPattern) |
void |
recomputeFromClassStats() |
void |
setNumClasses(int numClasses) |
void |
setSize(int size) |
int |
size() |
java.lang.String |
toString() |
void |
writeBugPriorities(XMLOutput xmlOutput)
Add priority attributes to a started tag.
|
static void |
writeBugPriorities(XMLOutput xmlOutput,
int[] nBugs) |
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput.
|
public static final java.lang.String ELEMENT_NAME
public static final int ALL_ERRORS
protected int[] nBugs
public PackageStats(java.lang.String packageName)
public PackageStats(java.lang.String packageName, int numClasses, int size)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Collection<PackageStats.ClassStats> getClassStats()
public int size()
public void setSize(int size)
@CheckForNull public PackageStats.ClassStats getClassStatsOrNull(java.lang.String name)
public void addError(BugInstance bug)
public void addClass(java.lang.String name, java.lang.String sourceFile, boolean isInterface, int size)
public void addClass(java.lang.String name, java.lang.String sourceFile, boolean isInterface, int size, boolean updatePackageStats)
public void addClass(PackageStats.ClassStats classStats)
public void addClass(PackageStats.ClassStats classStats, boolean updatePackageStats)
public java.lang.String getPackageName()
public int getNumClasses()
public void setNumClasses(int numClasses)
public void writeXML(XMLOutput xmlOutput) throws java.io.IOException
XMLWriteable
writeXML
in interface XMLWriteable
xmlOutput
- the XMLOutput for the documentjava.io.IOException
public java.util.Collection<PackageStats.ClassStats> getSortedClassStats()
public void recomputeFromClassStats()
public void clearBugCounts()
public void purgeClassesThatDontMatch(java.util.regex.Pattern classPattern)
classPattern
- protected void ensureNonnullBugCounts()
public final int getTotalBugs()
public final int getBugsAtPriority(int p)
public void writeBugPriorities(XMLOutput xmlOutput) throws java.io.IOException
xmlOutput
- an output stream for which startTag has been called but
stopTag has not.java.io.IOException
public static void writeBugPriorities(XMLOutput xmlOutput, @Nonnull int[] nBugs) throws java.io.IOException
java.io.IOException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.