Package edu.umd.cs.findbugs
Class PackageStats.ClassStats
- java.lang.Object
-
- edu.umd.cs.findbugs.PackageStats.ClassStats
-
- All Implemented Interfaces:
XMLWriteable
,java.lang.Cloneable
- Enclosing class:
- PackageStats
public static class PackageStats.ClassStats extends java.lang.Object implements XMLWriteable, java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
nBugs
-
Constructor Summary
Constructors Constructor Description ClassStats(java.lang.String name, java.lang.String sourceFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(BugInstance bug)
void
clearBugCounts()
java.lang.Object
clone()
protected void
ensureNonnullBugCounts()
int
getBugsAtPriority(int p)
java.lang.String
getName()
java.lang.String
getSourceFile()
int
getTotalBugs()
void
setInterface(boolean isInterface)
void
setSize(int size)
int
size()
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.
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
setInterface
public void setInterface(boolean isInterface)
-
setSize
public void setSize(int size)
-
size
public int size()
-
getName
public java.lang.String getName()
-
getSourceFile
@CheckForNull public java.lang.String getSourceFile()
-
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 interfaceXMLWriteable
- Parameters:
xmlOutput
- the XMLOutput for the document- Throws:
java.io.IOException
-
addError
@OverridingMethodsMustInvokeSuper public void addError(BugInstance bug)
-
ensureNonnullBugCounts
protected void ensureNonnullBugCounts()
-
getTotalBugs
public final int getTotalBugs()
-
getBugsAtPriority
public final int getBugsAtPriority(int p)
-
clearBugCounts
public void clearBugCounts()
-
writeBugPriorities
public void writeBugPriorities(XMLOutput xmlOutput) 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.- Throws:
java.io.IOException
-
writeBugPriorities
public static void writeBugPriorities(XMLOutput xmlOutput, @Nonnull int[] nBugs) throws java.io.IOException
- Throws:
java.io.IOException
-
-