1 Clazz.declarePackage ("org.xml.sax.helpers");
2 Clazz.load (["org.xml.sax.AttributeList", "java.util.Vector"], "org.xml.sax.helpers.AttributeListImpl", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
7 Clazz.instantialize (this, arguments);
8 }, org.xml.sax.helpers, "AttributeListImpl", null, org.xml.sax.AttributeList);
9 Clazz.prepareFields (c$, function () {
10 this.names = new java.util.Vector ();
11 this.types = new java.util.Vector ();
12 this.values = new java.util.Vector ();
14 Clazz.makeConstructor (c$,
17 Clazz.makeConstructor (c$,
19 this.setAttributeList (atts);
20 }, "org.xml.sax.AttributeList");
21 Clazz.defineMethod (c$, "setAttributeList",
23 var count = atts.getLength ();
25 for (var i = 0; i < count; i++) {
26 this.addAttribute (atts.getName (i), atts.getType (i), atts.getValue (i));
28 }, "org.xml.sax.AttributeList");
29 Clazz.defineMethod (c$, "addAttribute",
30 function (name, type, value) {
31 this.names.addElement (name);
32 this.types.addElement (type);
33 this.values.addElement (value);
35 Clazz.defineMethod (c$, "removeAttribute",
37 var i = this.names.indexOf (name);
39 this.names.removeElementAt (i);
40 this.types.removeElementAt (i);
41 this.values.removeElementAt (i);
43 Clazz.defineMethod (c$, "clear",
45 this.names.removeAllElements ();
46 this.types.removeAllElements ();
47 this.values.removeAllElements ();
49 Clazz.defineMethod (c$, "getLength",
51 return this.names.size ();
53 Clazz.defineMethod (c$, "getName",
58 return this.names.elementAt (i);
60 if (Clazz.exceptionOf (e, ArrayIndexOutOfBoundsException)) {
67 Clazz.defineMethod (c$, "getType",
72 return this.types.elementAt (i);
74 if (Clazz.exceptionOf (e, ArrayIndexOutOfBoundsException)) {
81 Clazz.defineMethod (c$, "getValue",
86 return this.values.elementAt (i);
88 if (Clazz.exceptionOf (e, ArrayIndexOutOfBoundsException)) {
95 Clazz.defineMethod (c$, "getType",
97 return this.getType (this.names.indexOf (name));
99 Clazz.defineMethod (c$, "getValue",
101 return this.getValue (this.names.indexOf (name));