01: package tide.exttools.findbugs;
02:
03: import java.io.*;
04: import java.util.*;
05: import org.xml.sax.*;
06:
07: /*
08: <FindBugsSummary timestamp="Wed, 19 Oct 2005 10:52:45 +0200" total_classes="220" total_bugs="225" total_size="10157" num_packages="14" priority_3="152" priority_2="67" priority_1="6">
09: <PackageStats package="org.apache.tools.tar" total_bugs="4" total_types="6" total_size="750" priority_3="1" priority_2="3">
10: <ClassStats class="org.apache.tools.tar.TarBuffer" interface="false" size="163" bugs="1" priority_3="1"/>
11: <ClassStats class="org.apache.tools.tar.TarConstants" interface="true" size="25" bugs="0"/>
12: <ClassStats class="org.apache.tools.tar.TarEntry" interface="false" size="234" bugs="1" priority_2="1"/>
13: <ClassStats class="org.apache.tools.tar.TarInputStream" interface="false" size="147" bugs="2" priority_2="2"/>
14: <ClassStats class="org.apache.tools.tar.TarOutputStream" interface="false" size="118" bugs="0"/>
15: <ClassStats class="org.apache.tools.tar.TarUtils" interface="false" size="63" bugs="0"/>
16: </PackageStats>
17: */
18: public class ClassStats {
19: public String className;
20: public String bugs;
21:
22: public ClassStats(Attributes attrs) {
23: readAttributes(attrs);
24: }
25:
26: private void readAttributes(Attributes attrs) {
27: for (int i = 0; i < attrs.getLength(); i++) {
28: String qname = attrs.getQName(i);
29: String value = attrs.getValue(qname);
30:
31: if (qname.equals("class")) {
32: className = value;
33: }
34: if (qname.equals("bugs")) {
35: bugs = value;
36: }
37:
38: /*else
39: {
40: //System.out.println("ClassStats ? "+qname +" = "+value);
41: }*/
42: }
43: }
44:
45: }
|