01: package tide.exttools.findbugs;
02:
03: import java.util.*;
04: import java.io.*;
05: import org.xml.sax.*;
06:
07: public class FindBugsSummary extends FindBugsTag {
08: final Vector<FindBugsTag.PackageStats> packageStats = new Vector<FindBugsTag.PackageStats>();
09: FindBugsTag.PackageStats actual;
10:
11: public FindBugsSummary() {
12: }
13:
14: // parser
15: //
16:
17: @Override
18: public void startElement(String namespaceURI, String lName, // local name
19: String qName, // qualified name
20: Attributes attrs) throws SAXException {
21: // create
22: if (qName.equals("PackageStats")) {
23: actual = new FindBugsTag.PackageStats(attrs);
24: } else // delegate
25: {
26: if (actual != null) {
27: actual.startElement(namespaceURI, lName, qName, attrs);
28: }
29: }
30:
31: //readAttributes(qName, attrs);
32: }
33:
34: // @Override
35: public void endElement(String namespaceURI, String sName, // simple name
36: String qName // qualified name
37: ) throws SAXException {
38: if (qName.equals("PackageStats")) {
39: packageStats.addElement(actual);
40: actual = null;
41: } else {
42: // delegate
43: if (actual != null) {
44: actual.endElement(namespaceURI, sName, qName);
45: } else {
46: System.out.println("FindBugsSummary unknown end "
47: + sName);
48: }
49: }
50: }
51:
52: }
|