edu.umd.cs.findbugs
Class PackageStats
java.lang.Object
edu.umd.cs.findbugs.PackageStats
- All Implemented Interfaces:
- XMLWriteable
public class PackageStats
- extends java.lang.Object
- implements XMLWriteable
Class to store package bug statistics.
- Author:
- Mike Fagan, Jay Dunning
Constructor Summary |
PackageStats(java.lang.String packageName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ELEMENT_NAME
public static final java.lang.String ELEMENT_NAME
- See Also:
- Constant Field Values
ALL_ERRORS
public static final int ALL_ERRORS
- See Also:
- Constant Field Values
PackageStats
public PackageStats(java.lang.String packageName)
getClassStats
public java.util.Collection<PackageStats.ClassStats> getClassStats()
getTotalBugs
public int getTotalBugs()
size
public int size()
getBugsAtPriority
public int getBugsAtPriority(int p)
getClassStatsOrNull
public PackageStats.ClassStats getClassStatsOrNull(java.lang.String name)
addError
public void addError(BugInstance bug)
addClass
public void addClass(java.lang.String name,
boolean isInterface,
int size)
getPackageName
public java.lang.String getPackageName()
writeXML
public void writeXML(XMLOutput xmlOutput)
throws java.io.IOException
- Description copied from interface:
XMLWriteable
- Write this object to given XMLOutput.
- Specified by:
writeXML
in interface XMLWriteable
- Parameters:
xmlOutput
- the XMLOutput for the document
- Throws:
java.io.IOException
writeBugPriorities
public static void writeBugPriorities(XMLOutput xmlOutput,
int[] bugs)
throws java.io.IOException
- 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.bugs
- an array for which the element at offset n is
the number of bugs for priority n.
- Throws:
java.io.IOException
clearBugCounts
public void clearBugCounts()